Bug #646
closedtests for miniunit have bad chemistry with other tests
Description
=begin
Hi,
The current tests for minitest seem to use at_exit, which lets the tests
be run every time when forked ruby process exits. As a result, test log
is hard to read:
$ make test-all TESTS="gdbm minitest"
./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb
./runruby.rb --extout=.ext -- "./test/runner.rb" gdbm minitest
Loaded suite [gdbm, minitest]
Started
...........................Loaded suite ./test/runner
Started
..................................................................................................................
Finished in 0.160002 seconds.
114 tests, 350 assertions, 0 failures, 0 errors, 0 skips
Loaded suite ./test/runner
Started
..................................................................................................................
Finished in 0.120002 seconds.
114 tests, 350 assertions, 0 failures, 0 errors, 0 skips
..Loaded suite ./test/runner
Started
..................................................................................................................
Finished in 0.140002 seconds.
114 tests, 350 assertions, 0 failures, 0 errors, 0 skips
Loaded suite ./test/runner
Started
..................................................................................................................
Finished in 0.050001 seconds.
114 tests, 350 assertions, 0 failures, 0 errors, 0 skips
Loaded suite ./test/runner
Started
..................................................................................................................
Finished in 0.080001 seconds.
114 tests, 350 assertions, 0 failures, 0 errors, 0 skips
..................
Finished in 9.150138028 seconds.
47 tests, 957 assertions, 0 failures, 0 errors
Loaded suite ./test/runner
Started
..................................................................................................................
Finished in 0.040001 seconds.
114 tests, 350 assertions, 0 failures, 0 errors, 0 skips
In addition, as might be expected, the summary text at the last ("47 tests,
957 assertions , ..." does not include the test result of minitest. It is
very inconvenience.
$ make test-all TESTS="gdbm"
./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb
./runruby.rb --extout=.ext -- "./test/runner.rb" gdbm
Loaded suite gdbm
Started
...............................................
Finished in 8.420127015 seconds.
47 tests, 957 assertions, 0 failures, 0 errors
I think we must do something about this problem, but I have no good idea
to solve this. Should the tests for minitest be separated from test/
directory?
--
Yusuke ENDOH mame@tsg.ne.jp
=end