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
This commit is contained in:
parent
1f23dd016b
commit
d4502a6767
@ -131,6 +131,9 @@ module Test
|
|||||||
if @options[:parallel]
|
if @options[:parallel]
|
||||||
@files = args
|
@files = args
|
||||||
end
|
end
|
||||||
|
if @jobserver
|
||||||
|
@run_options << @jobserver.each_with_object({}) {|fd, opts| opts[fd] = fd}
|
||||||
|
end
|
||||||
options
|
options
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -191,11 +194,9 @@ module Test
|
|||||||
|
|
||||||
class Worker
|
class Worker
|
||||||
def self.launch(ruby,args=[])
|
def self.launch(ruby,args=[])
|
||||||
opts = {}
|
|
||||||
@jobserver.each {|fd| opts[fd] = fd} if @jobserver
|
|
||||||
io = IO.popen([*ruby, "-W1",
|
io = IO.popen([*ruby, "-W1",
|
||||||
"#{File.dirname(__FILE__)}/unit/parallel.rb",
|
"#{File.dirname(__FILE__)}/unit/parallel.rb",
|
||||||
*args], "rb+", opts)
|
*args], "rb+")
|
||||||
new(io, io.pid, :waiting)
|
new(io, io.pid, :waiting)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user