-
Notifications
You must be signed in to change notification settings - Fork 106
bin: add support for specifying test targets #291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
GitHub: fix test-unitGH-288 This patch is the final step. It allows specifying test targets.
|
I tested following commands and confirmed they work correctly: $ bundle exec test-unit --exclude=run-test.rb test
$ bundle exec test-unit --exclude=run-test.rb test/test-assertions.rb
$ bundle exec test-unit --exclude=run-test.rb test/test-assertions.rb:143
$ bundle exec test-unit --exclude=run-test.rb test/test-assertions.rb test/test-data.rb
$ bundle exec test-unit --exclude=run-test.rb test -n /collect/
$ bundle exec test-unit --exclude=run-test.rb test -n /collect/ --parallel |
|
What happen with BTW, we should rename |
It works correctly: $ bundle exec test-unit --exclude=run-test.rb
Loaded suite .
Started
O
===============================================================================
Omission: memory usage collection isn't supported on this platform [test_fail(Test::Unit::TestAssertNothingLeakedMemory)]
/Users/zzz/src/github.com/test-unit/test-unit/test/test-assertions.rb:2986:in 'block in Test::Unit::TestAssertNothingLeakedMemory#test_fail'
===============================================================================
O
===============================================================================
Omission: memory usage collection isn't supported on this platform [test_pass(Test::Unit::TestAssertNothingLeakedMemory)]
/Users/zzz/src/github.com/test-unit/test-unit/test/test-assertions.rb:2933:in 'block in Test::Unit::TestAssertNothingLeakedMemory#test_pass'
===============================================================================
O
===============================================================================
Omission: memory usage collection isn't supported on this platform [test_pass_message(Test::Unit::TestAssertNothingLeakedMemory)]
/Users/zzz/src/github.com/test-unit/test-unit/test/test-assertions.rb:2944:in 'block in Test::Unit::TestAssertNothingLeakedMemory#test_pass_message'
===============================================================================
O
===============================================================================
Omission: memory usage collection isn't supported on this platform [test_pass_target(Test::Unit::TestAssertNothingLeakedMemory)]
/Users/zzz/src/github.com/test-unit/test-unit/test/test-assertions.rb:2957:in 'block in Test::Unit::TestAssertNothingLeakedMemory#test_pass_target'
===============================================================================
O
===============================================================================
Omission: test for JRuby [test_assert_raise_jruby(Test::Unit::TestAssertions)]
/Users/zzz/src/github.com/test-unit/test-unit/test/testunit-test-util.rb:15:in 'TestUnitTestUtil#jruby_only_test'
===============================================================================
O
===============================================================================
Omission: test for JRuby [test_error_inside_jruby(TestCodeSnippet::TestJRuby)]
/Users/zzz/src/github.com/test-unit/test-unit/test/testunit-test-util.rb:15:in 'TestUnitTestUtil#jruby_only_test'
===============================================================================
Finished in 0.778207 seconds.
-------------------------------------------------------------------------------
478 tests, 1616 assertions, 0 failures, 0 errors, 0 pendings, 6 omissions, 0 notifications
100% passed
-------------------------------------------------------------------------------
614.23 tests/s, 2076.57 assertions/sIn this case, the test target is maybe the current directory. require "test/unit"
class SampleTest < Test::Unit::TestCase
def test_1
pp __method__
assert true
end
end$ bundle exec test-unit --exclude=run-test.rb
Loaded suite .
Started
:test_1
O
===============================================================================
Omission: memory usage collection isn't supported on this platform [test_fail(Test::Unit::TestAssertNothingLeakedMemory)]
/Users/zzz/src/github.com/test-unit/test-unit/test/test-assertions.rb:2986:in 'block in Test::Unit::TestAssertNothingLeakedMemory#test_fail'
===============================================================================
O
===============================================================================
Omission: memory usage collection isn't supported on this platform [test_pass(Test::Unit::TestAssertNothingLeakedMemory)]
/Users/zzz/src/github.com/test-unit/test-unit/test/test-assertions.rb:2933:in 'block in Test::Unit::TestAssertNothingLeakedMemory#test_pass'
===============================================================================
O
===============================================================================
Omission: memory usage collection isn't supported on this platform [test_pass_message(Test::Unit::TestAssertNothingLeakedMemory)]
/Users/zzz/src/github.com/test-unit/test-unit/test/test-assertions.rb:2944:in 'block in Test::Unit::TestAssertNothingLeakedMemory#test_pass_message'
===============================================================================
O
===============================================================================
Omission: memory usage collection isn't supported on this platform [test_pass_target(Test::Unit::TestAssertNothingLeakedMemory)]
/Users/zzz/src/github.com/test-unit/test-unit/test/test-assertions.rb:2957:in 'block in Test::Unit::TestAssertNothingLeakedMemory#test_pass_target'
===============================================================================
O
===============================================================================
Omission: test for JRuby [test_assert_raise_jruby(Test::Unit::TestAssertions)]
/Users/zzz/src/github.com/test-unit/test-unit/test/testunit-test-util.rb:15:in 'TestUnitTestUtil#jruby_only_test'
===============================================================================
O
===============================================================================
Omission: test for JRuby [test_error_inside_jruby(TestCodeSnippet::TestJRuby)]
/Users/zzz/src/github.com/test-unit/test-unit/test/testunit-test-util.rb:15:in 'TestUnitTestUtil#jruby_only_test'
===============================================================================
Finished in 0.762427 seconds.
-------------------------------------------------------------------------------
479 tests, 1617 assertions, 0 failures, 0 errors, 0 pendings, 6 omissions, 0 notifications
100% passed
-------------------------------------------------------------------------------
628.26 tests/s, 2120.86 assertions/swith test target: $ bundle exec test-unit --exclude=run-test.rb test
Loaded suite test
Started
O
===============================================================================
Omission: memory usage collection isn't supported on this platform [test_fail(Test::Unit::TestAssertNothingLeakedMemory)]
/Users/zzz/src/github.com/test-unit/test-unit/test/test-assertions.rb:2986:in 'block in Test::Unit::TestAssertNothingLeakedMemory#test_fail'
===============================================================================
O
===============================================================================
Omission: memory usage collection isn't supported on this platform [test_pass(Test::Unit::TestAssertNothingLeakedMemory)]
/Users/zzz/src/github.com/test-unit/test-unit/test/test-assertions.rb:2933:in 'block in Test::Unit::TestAssertNothingLeakedMemory#test_pass'
===============================================================================
O
===============================================================================
Omission: memory usage collection isn't supported on this platform [test_pass_message(Test::Unit::TestAssertNothingLeakedMemory)]
/Users/zzz/src/github.com/test-unit/test-unit/test/test-assertions.rb:2944:in 'block in Test::Unit::TestAssertNothingLeakedMemory#test_pass_message'
===============================================================================
O
===============================================================================
Omission: memory usage collection isn't supported on this platform [test_pass_target(Test::Unit::TestAssertNothingLeakedMemory)]
/Users/zzz/src/github.com/test-unit/test-unit/test/test-assertions.rb:2957:in 'block in Test::Unit::TestAssertNothingLeakedMemory#test_pass_target'
===============================================================================
O
===============================================================================
Omission: test for JRuby [test_assert_raise_jruby(Test::Unit::TestAssertions)]
/Users/zzz/src/github.com/test-unit/test-unit/test/testunit-test-util.rb:15:in 'TestUnitTestUtil#jruby_only_test'
===============================================================================
O
===============================================================================
Omission: test for JRuby [test_error_inside_jruby(TestCodeSnippet::TestJRuby)]
/Users/zzz/src/github.com/test-unit/test-unit/test/testunit-test-util.rb:15:in 'TestUnitTestUtil#jruby_only_test'
===============================================================================
Finished in 0.758385 seconds.
-------------------------------------------------------------------------------
474 tests, 1612 assertions, 0 failures, 0 errors, 0 pendings, 6 omissions, 0 notifications
100% passed
-------------------------------------------------------------------------------
625.01 tests/s, 2125.57 assertions/s
That makes sense. Without $ mv test/run-test.rb test/run.rb
$ bundle exec test-unit test
Loaded suite test
Started
O
===============================================================================
Omission: memory usage collection isn't supported on this platform [test_fail(Test::Unit::TestAssertNothingLeakedMemory)]
/Users/zzz/src/github.com/test-unit/test-unit/test/test-assertions.rb:2986:in 'block in Test::Unit::TestAssertNothingLeakedMemory#test_fail'
===============================================================================
O
===============================================================================
Omission: memory usage collection isn't supported on this platform [test_pass(Test::Unit::TestAssertNothingLeakedMemory)]
/Users/zzz/src/github.com/test-unit/test-unit/test/test-assertions.rb:2933:in 'block in Test::Unit::TestAssertNothingLeakedMemory#test_pass'
===============================================================================
O
===============================================================================
Omission: memory usage collection isn't supported on this platform [test_pass_message(Test::Unit::TestAssertNothingLeakedMemory)]
/Users/zzz/src/github.com/test-unit/test-unit/test/test-assertions.rb:2944:in 'block in Test::Unit::TestAssertNothingLeakedMemory#test_pass_message'
===============================================================================
O
===============================================================================
Omission: memory usage collection isn't supported on this platform [test_pass_target(Test::Unit::TestAssertNothingLeakedMemory)]
/Users/zzz/src/github.com/test-unit/test-unit/test/test-assertions.rb:2957:in 'block in Test::Unit::TestAssertNothingLeakedMemory#test_pass_target'
===============================================================================
O
===============================================================================
Omission: test for JRuby [test_assert_raise_jruby(Test::Unit::TestAssertions)]
/Users/zzz/src/github.com/test-unit/test-unit/test/testunit-test-util.rb:15:in 'TestUnitTestUtil#jruby_only_test'
===============================================================================
O
===============================================================================
Omission: test for JRuby [test_error_inside_jruby(TestCodeSnippet::TestJRuby)]
/Users/zzz/src/github.com/test-unit/test-unit/test/testunit-test-util.rb:15:in 'TestUnitTestUtil#jruby_only_test'
===============================================================================
Finished in 0.778561 seconds.
-------------------------------------------------------------------------------
474 tests, 1612 assertions, 0 failures, 0 errors, 0 pendings, 6 omissions, 0 notifications
100% passed
-------------------------------------------------------------------------------
608.82 tests/s, 2070.49 assertions/s |
|
OK. Let's use this. |
|
Thanks for your review! |
GitHub: fix GH-288
This patch is the final step. It allows specifying test targets.