aboutsummaryrefslogtreecommitdiffstats
path: root/tool/test/testunit/test_parallel.rb
diff options
context:
space:
mode:
authorlukeg <luke.gru@gmail.com>2023-03-15 12:53:44 -0400
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-10-26 12:39:13 +0900
commit7717684d164d8ff8beece61170f0083c7dcb45fd (patch)
tree5ecc3d7552385809c28d545581dcf0db8ee0bf9e /tool/test/testunit/test_parallel.rb
parentad06addbfe7e5c22b8cb75ebb85fffbeeda4a71c (diff)
downloadruby-7717684d164d8ff8beece61170f0083c7dcb45fd.tar.gz
tool test/unit/testcase: rename vars @passed, @@current
to @__passed__, @@__current__. @passed is redefined in a few test suites, and this could lead to bugs. Also rename @options (Runner#options) to @__runner_options__, which is only used in make test-tool anyway.
Diffstat (limited to 'tool/test/testunit/test_parallel.rb')
-rw-r--r--tool/test/testunit/test_parallel.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/tool/test/testunit/test_parallel.rb b/tool/test/testunit/test_parallel.rb
index 454c26a6ac..f79c3a1d80 100644
--- a/tool/test/testunit/test_parallel.rb
+++ b/tool/test/testunit/test_parallel.rb
@@ -12,8 +12,8 @@ module TestParallel
def setup
i, @worker_in = IO.pipe
@worker_out, o = IO.pipe
- @worker_pid = spawn(*@options[:ruby], PARALLEL_RB,
- "--ruby", @options[:ruby].join(" "),
+ @worker_pid = spawn(*@__runner_options__[:ruby], PARALLEL_RB,
+ "--ruby", @__runner_options__[:ruby].join(" "),
"-j", "t1", "-v", out: o, in: i)
[i,o].each(&:close)
end
@@ -145,8 +145,8 @@ module TestParallel
class TestParallel < Test::Unit::TestCase
def spawn_runner(*opt_args, jobs: "t1")
@test_out, o = IO.pipe
- @test_pid = spawn(*@options[:ruby], TESTS+"/runner.rb",
- "--ruby", @options[:ruby].join(" "),
+ @test_pid = spawn(*@__runner_options__[:ruby], TESTS+"/runner.rb",
+ "--ruby", @__runner_options__[:ruby].join(" "),
"-j", jobs, *opt_args, out: o, err: o)
o.close
end