diff options
author | Nobuyoshi Nakada <[email protected]> | 2023-10-17 16:59:41 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2023-10-18 02:55:42 +0900 |
commit | 8b520bd3fb239cbfba150644bf7c5676bb07a579 (patch) | |
tree | b8eab46d3085c3592141c5ddd1e824a3b7ab1e31 | |
parent | 5a3e8d2f187d54f336090c438ad9a202f137373a (diff) |
Add `jobs` optional keyword argument
-rw-r--r-- | tool/test/testunit/test_parallel.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/tool/test/testunit/test_parallel.rb b/tool/test/testunit/test_parallel.rb index 29176483b5..1b64afdffe 100644 --- a/tool/test/testunit/test_parallel.rb +++ b/tool/test/testunit/test_parallel.rb @@ -143,11 +143,11 @@ module TestParallel end class TestParallel < Test::Unit::TestCase - def spawn_runner(*opt_args) + def spawn_runner(*opt_args, jobs: "t1") @test_out, o = IO.pipe @test_pid = spawn(*@options[:ruby], TESTS+"/runner.rb", "--ruby", @options[:ruby].join(" "), - "-j","t1",*opt_args, out: o, err: o) + "-j", jobs, *opt_args, out: o, err: o) o.close end @@ -166,11 +166,7 @@ module TestParallel end def test_ignore_jzero - @test_out, o = IO.pipe - @test_pid = spawn(*@options[:ruby], TESTS+"/runner.rb", - "--ruby", @options[:ruby].join(" "), - "-j","0", out: File::NULL, err: o) - o.close + spawn_runner(jobs: "0") Timeout.timeout(TIMEOUT) { assert_match(/Error: parameter of -j option should be greater than 0/,@test_out.read) } |