Issue #5132 has been reported by Ayumu AIZAWA.

----------------------------------------
Bug #5132: test_parallel.rb fail when it run before 'make install'
http://redmine.ruby-lang.org/issues/5132

Author: Ayumu AIZAWA
Status: Open
Priority: Normal
Assignee: 
Category: test
Target version: 1.9.x
ruby -v: 1.9


make install を実行する前にmake test-all をすると、test_parallel.rb が失敗します。
trunkとruby_1_9_3 で再現することまで確認しました。

$ uname -a
Linux Ubuntu11 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:07:17 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux 
$ make test-all TESTS='-v test/testunit/test_parallel.rb'
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems "./test/runner.rb" --ruby="./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems" -v test/testunit/test_parallel.rb
Run options: "--ruby=./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems" -v

# Running tests:

TestParallel::TestParallel#test_ignore_jzero = 0.05 s = .
TestParallel::TestParallel#test_jobs_status = 0.05 s = F
TestParallel::TestParallel#test_no_retry_option = 0.05 s = F
TestParallel::TestParallel#test_should_retry_failed_on_workers = 0.05 s = F
TestParallel::TestParallel#test_should_run_all_without_any_leaks = 0.05 s = F
TestParallel::TestParallelWorker#test_accept_run_command_multiple_times = 0.05 s = .
TestParallel::TestParallelWorker#test_done = 0.05 s = .
TestParallel::TestParallelWorker#test_p = 0.05 s = .
TestParallel::TestParallelWorker#test_quit = 0.05 s = .
TestParallel::TestParallelWorker#test_run = 0.05 s = .
TestParallel::TestParallelWorker#test_run_multiple_testcase_in_one_file = 0.05 s = .


Finished tests in 0.554289s, 19.8453 tests/s, 72.1646 assertions/s.

  1) Failure:
test_jobs_status(TestParallel::TestParallel) [/home/ayumin/github/ruby/test/testunit/test_parallel.rb:174]:
Expected /\d+=ptest_(first|second|third|forth) */ to match "Run options: -j t1 --jobs-status\n\n# Running tests:\n\n/home/ayumin/github/ruby/lib/test/unit.rb:496:in `ensure in _run_parallel': undefined method `each' for nil:NilClass (NoMethodError)\n\tfrom /home/ayumin/github/ruby/lib/test/unit.rb:552:in `_run_parallel'\n\tfrom /home/ayumin/github/ruby/lib/test/unit.rb:561:in `_run_suites'\n\tfrom /home/ayumin/github/ruby/lib/minitest/unit.rb:746:in `_run_anything'\n\tfrom /home/ayumin/github/ruby/lib/minitest/unit.rb:909:in `run_tests'\n\tfrom /home/ayumin/github/ruby/lib/minitest/unit.rb:896:in `block in _run'\n\tfrom /home/ayumin/github/ruby/lib/minitest/unit.rb:895:in `each'\n\tfrom /home/ayumin/github/ruby/lib/minitest/unit.rb:895:in `_run'\n\tfrom /home/ayumin/github/ruby/lib/minitest/unit.rb:884:in `run'\n\tfrom /home/ayumin/github/ruby/lib/test/unit.rb:21:in `run'\n\tfrom /home/ayumin/github/ruby/lib/test/unit.rb:630:in `run'\n\tfrom /home/ayumin/github/ruby/lib/test/
 unit.rb:634:in `run'\n\tfrom /home/ayumin/github/ruby/test/testunit/tests_for_parallel/runner.rb:10:in `<main>'\n".

  2) Failure:
test_no_retry_option(TestParallel::TestParallel) [/home/ayumin/github/ruby/test/testunit/test_parallel.rb:168]:
Expected /^ +\d+\) Failure:\ntest_fail_at_worker\(TestD\)/ to match "Run options: -j t1 --no-retry\n\n# Running tests:\n\n/home/ayumin/github/ruby/lib/test/unit.rb:496:in `ensure in _run_parallel': undefined method `each' for nil:NilClass (NoMethodError)\n\tfrom /home/ayumin/github/ruby/lib/test/unit.rb:552:in `_run_parallel'\n\tfrom /home/ayumin/github/ruby/lib/test/unit.rb:561:in `_run_suites'\n\tfrom /home/ayumin/github/ruby/lib/minitest/unit.rb:746:in `_run_anything'\n\tfrom /home/ayumin/github/ruby/lib/minitest/unit.rb:909:in `run_tests'\n\tfrom /home/ayumin/github/ruby/lib/minitest/unit.rb:896:in `block in _run'\n\tfrom /home/ayumin/github/ruby/lib/minitest/unit.rb:895:in `each'\n\tfrom /home/ayumin/github/ruby/lib/minitest/unit.rb:895:in `_run'\n\tfrom /home/ayumin/github/ruby/lib/minitest/unit.rb:884:in `run'\n\tfrom /home/ayumin/github/ruby/lib/test/unit.rb:21:in `run'\n\tfrom /home/ayumin/github/ruby/lib/test/unit.rb:630:in `run'\n\tfrom /home/ayumin/github/ruby/lib
 /test/unit.rb:634:in `run'\n\tfrom /home/ayumin/github/ruby/test/testunit/tests_for_parallel/runner.rb:10:in `<main>'\n".

  3) Failure:
test_should_retry_failed_on_workers(TestParallel::TestParallel) [/home/ayumin/github/ruby/test/testunit/test_parallel.rb:161]:
Expected /^Retrying\.+$/ to match "Run options: -j t1\n\n# Running tests:\n\n/home/ayumin/github/ruby/lib/test/unit.rb:496:in `ensure in _run_parallel': undefined method `each' for nil:NilClass (NoMethodError)\n\tfrom /home/ayumin/github/ruby/lib/test/unit.rb:552:in `_run_parallel'\n\tfrom /home/ayumin/github/ruby/lib/test/unit.rb:561:in `_run_suites'\n\tfrom /home/ayumin/github/ruby/lib/minitest/unit.rb:746:in `_run_anything'\n\tfrom /home/ayumin/github/ruby/lib/minitest/unit.rb:909:in `run_tests'\n\tfrom /home/ayumin/github/ruby/lib/minitest/unit.rb:896:in `block in _run'\n\tfrom /home/ayumin/github/ruby/lib/minitest/unit.rb:895:in `each'\n\tfrom /home/ayumin/github/ruby/lib/minitest/unit.rb:895:in `_run'\n\tfrom /home/ayumin/github/ruby/lib/minitest/unit.rb:884:in `run'\n\tfrom /home/ayumin/github/ruby/lib/test/unit.rb:21:in `run'\n\tfrom /home/ayumin/github/ruby/lib/test/unit.rb:630:in `run'\n\tfrom /home/ayumin/github/ruby/lib/test/unit.rb:634:in `run'\n\tfrom /home/ayum
 in/github/ruby/test/testunit/tests_for_parallel/runner.rb:10:in `<main>'\n".

  4) Failure:
test_should_run_all_without_any_leaks(TestParallel::TestParallel) [/home/ayumin/github/ruby/test/testunit/test_parallel.rb:155]:
Expected /^[SF\.]{7}$/ to match "Run options: -j t1\n\n# Running tests:\n\n/home/ayumin/github/ruby/lib/test/unit.rb:496:in `ensure in _run_parallel': undefined method `each' for nil:NilClass (NoMethodError)\n\tfrom /home/ayumin/github/ruby/lib/test/unit.rb:552:in `_run_parallel'\n\tfrom /home/ayumin/github/ruby/lib/test/unit.rb:561:in `_run_suites'\n\tfrom /home/ayumin/github/ruby/lib/minitest/unit.rb:746:in `_run_anything'\n\tfrom /home/ayumin/github/ruby/lib/minitest/unit.rb:909:in `run_tests'\n\tfrom /home/ayumin/github/ruby/lib/minitest/unit.rb:896:in `block in _run'\n\tfrom /home/ayumin/github/ruby/lib/minitest/unit.rb:895:in `each'\n\tfrom /home/ayumin/github/ruby/lib/minitest/unit.rb:895:in `_run'\n\tfrom /home/ayumin/github/ruby/lib/minitest/unit.rb:884:in `run'\n\tfrom /home/ayumin/github/ruby/lib/test/unit.rb:21:in `run'\n\tfrom /home/ayumin/github/ruby/lib/test/unit.rb:630:in `run'\n\tfrom /home/ayumin/github/ruby/lib/test/unit.rb:634:in `run'\n\tfrom /home/ayumin
 /github/ruby/test/testunit/tests_for_parallel/runner.rb:10:in `<main>'\n".

11 tests, 40 assertions, 4 failures, 0 errors, 0 skips
make: *** [yes-test-all] エラー 4



-- 
http://redmine.ruby-lang.org