1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/test/unit.rb (Test::Unit::Runner#_run_parallel): check if worker

is signaled and use its exit status.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-04-14 13:48:00 +00:00
parent 311b3b4ff8
commit ed1c3f56c0
2 changed files with 8 additions and 4 deletions

View file

@ -1,4 +1,7 @@
Thu Apr 14 22:47:49 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
Thu Apr 14 22:47:54 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/test/unit.rb (Test::Unit::Runner#_run_parallel): check if worker
is signaled and use its exit status.
* lib/test/unit.rb (Test::Unit::Runner::Worker#dead): no longer @in
and @out are separated.

View file

@ -329,7 +329,7 @@ module Test
@@installed_at_exit = true
end
def after_worker_down(worker, e=nil, c=1)
def after_worker_down(worker, e=nil, c=false)
return unless @opts[:parallel]
return if @interrupt
if e
@ -404,11 +404,12 @@ module Test
watchdog = Thread.new do
while stat = Process.wait2
break if @interrupt # Break when interrupt
w = (@workers + @dead_workers).find{|x| stat[0] == x.pid }.dup
pid, stat = stat
w = (@workers + @dead_workers).find{|x| pid == x.pid }.dup
next unless w
unless w.status == :quit
# Worker down
w.dead(nil, stat[1].to_i)
w.dead(nil, !stat.signaled? && stat.exitstatus)
end
end
end