ruby-changes:45453
From: nobu <ko1@a...>
Date: Sat, 4 Feb 2017 14:23:52 +0900 (JST)
Subject: [ruby-changes:45453] nobu:r57526 (trunk): test/unit.rb: jobserver for workers
nobu 2017-02-04 14:23:48 +0900 (Sat, 04 Feb 2017) New Revision: 57526 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57526 Log: 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. Modified files: trunk/test/lib/test/unit.rb Index: test/lib/test/unit.rb =================================================================== --- test/lib/test/unit.rb (revision 57525) +++ test/lib/test/unit.rb (revision 57526) @@ -131,6 +131,9 @@ module Test https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit.rb#L131 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 https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit.rb#L194 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/