diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-04 05:23:48 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-04 05:23:48 +0000 |
commit | 40a05f5d7f417218ca6d081ae6d05d71b8f2070b (patch) | |
tree | 70198f7081e2ae0274de856f80ae84b78ca324a9 /test/lib | |
parent | 9a174eaa7a899979a574e568be4ad2526de939dc (diff) | |
download | ruby-40a05f5d7f417218ca6d081ae6d05d71b8f2070b.tar.gz |
test/unit.rb: jobserver for workers
* test/lib/test/unit.rb (Test::Unit::Parallel#process_args):
initialize @run_options to pass jobserver auth pipes to worker
processes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/lib')
-rw-r--r-- | test/lib/test/unit.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/lib/test/unit.rb b/test/lib/test/unit.rb index c0662f580d..9173e5414c 100644 --- a/test/lib/test/unit.rb +++ b/test/lib/test/unit.rb @@ -131,6 +131,9 @@ module Test if @options[:parallel] @files = args end + if @jobserver + @run_options << @jobserver.each_with_object({}) {|fd, opts| opts[fd] = fd} + end options end @@ -191,11 +194,9 @@ module Test class Worker def self.launch(ruby,args=[]) - opts = {} - @jobserver.each {|fd| opts[fd] = fd} if @jobserver io = IO.popen([*ruby, "-W1", "#{File.dirname(__FILE__)}/unit/parallel.rb", - *args], "rb+", opts) + *args], "rb+") new(io, io.pid, :waiting) end |