mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/lib/test/unit.rb (Test::Unit::Parallel#start_watchdog): removed
because it has been meaningless since r36385. [Bug:11288] * test/lib/test/unit.rb (Test::Unit::Parallel#_run_parallel): delete lines related to the removed start_watchdog method git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cc934fc31c
commit
05f78a6fd2
2 changed files with 8 additions and 20 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Mon Jun 22 18:08:48 2015 Naohisa Goto <ngotogenome@gmail.com>
|
||||||
|
|
||||||
|
* test/lib/test/unit.rb (Test::Unit::Parallel#start_watchdog): removed
|
||||||
|
because it has been meaningless since r36385. [Bug:11288]
|
||||||
|
|
||||||
|
* test/lib/test/unit.rb (Test::Unit::Parallel#_run_parallel): delete
|
||||||
|
lines related to the removed start_watchdog method
|
||||||
|
|
||||||
Sun Jun 21 23:52:46 2015 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
|
Sun Jun 21 23:52:46 2015 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
|
||||||
|
|
||||||
* NEWS: mention Array#bsearch_index and Hash#fetch_values.
|
* NEWS: mention Array#bsearch_index and Hash#fetch_values.
|
||||||
|
|
|
@ -314,22 +314,6 @@ module Test
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def start_watchdog
|
|
||||||
Thread.new do
|
|
||||||
while stat = Process.wait2
|
|
||||||
break if @interrupt # Break when interrupt
|
|
||||||
pid, stat = stat
|
|
||||||
w = (@workers + @dead_workers).find{|x| pid == x.pid }
|
|
||||||
next unless w
|
|
||||||
w = w.dup
|
|
||||||
if w.status != :quit && !w.quit_called?
|
|
||||||
# Worker down
|
|
||||||
w.died(nil, !stat.signaled? && stat.exitstatus)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def deal(io, type, result, rep, shutting_down = false)
|
def deal(io, type, result, rep, shutting_down = false)
|
||||||
worker = @workers_hash[io]
|
worker = @workers_hash[io]
|
||||||
cmd = worker.read
|
cmd = worker.read
|
||||||
|
@ -404,9 +388,6 @@ module Test
|
||||||
@workers_hash = {} # out-IO => worker
|
@workers_hash = {} # out-IO => worker
|
||||||
@ios = [] # Array of worker IOs
|
@ios = [] # Array of worker IOs
|
||||||
begin
|
begin
|
||||||
# Thread: watchdog
|
|
||||||
watchdog = start_watchdog
|
|
||||||
|
|
||||||
@options[:parallel].times {launch_worker}
|
@options[:parallel].times {launch_worker}
|
||||||
|
|
||||||
while _io = IO.select(@ios)[0]
|
while _io = IO.select(@ios)[0]
|
||||||
|
@ -420,7 +401,6 @@ module Test
|
||||||
@interrupt = ex
|
@interrupt = ex
|
||||||
return result
|
return result
|
||||||
ensure
|
ensure
|
||||||
watchdog.kill if watchdog
|
|
||||||
if @interrupt
|
if @interrupt
|
||||||
@ios.select!{|x| @workers_hash[x].status == :running }
|
@ios.select!{|x| @workers_hash[x].status == :running }
|
||||||
while !@ios.empty? && (__io = IO.select(@ios,[],[],10))
|
while !@ios.empty? && (__io = IO.select(@ios,[],[],10))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue