test/unit.rb: _run_parallel
* lib/test/unit.rb (Test::Unit::Runner#_run_parallel): move initializations with nothing to release outside begin/ensure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d61dfcc793
commit
b789a6b4d6
26
ChangeLog
26
ChangeLog
@ -1,3 +1,29 @@
|
|||||||
|
Sat Jul 14 16:16:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/test/unit.rb (Test::Unit::Runner#_run_parallel): move
|
||||||
|
initializations with nothing to release outside begin/ensure.
|
||||||
|
|
||||||
|
* lib/test/unit.rb (Test::Unit::Runner#_run_parallel): use
|
||||||
|
Array#uniq!.
|
||||||
|
|
||||||
|
* lib/test/unit.rb (Test::Unit::Runner#deal): deal tasks to workers.
|
||||||
|
|
||||||
|
* lib/test/unit.rb (Test::Unit::Runner#quit_workers): close and kill
|
||||||
|
all workers.
|
||||||
|
|
||||||
|
* lib/test/unit.rb (Test::Unit::Runner#delete_worker): delete dead
|
||||||
|
worker from working set.
|
||||||
|
|
||||||
|
* lib/test/unit.rb (Test::Unit::Runner#launch_worker): add new worker
|
||||||
|
to working set.
|
||||||
|
|
||||||
|
* lib/test/unit.rb (Test::Unit::Runner#launch_worker): extract.
|
||||||
|
|
||||||
|
* lib/test/unit.rb (Test::Unit::Runner#start_watchdog): extract.
|
||||||
|
|
||||||
|
* lib/test/unit.rb (Test::Unit::Runner#_run_parallel): move
|
||||||
|
initializations with nothing to release outside begin/ensure.
|
||||||
|
|
||||||
Sat Jul 14 16:04:24 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sat Jul 14 16:04:24 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* array.c (rb_ary_join): should not infected by separator if it is not
|
* array.c (rb_ary_join): should not infected by separator if it is not
|
||||||
|
@ -458,18 +458,18 @@ module Test
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
begin
|
# Require needed things for parallel running
|
||||||
# Require needed things for parallel running
|
require 'thread'
|
||||||
require 'thread'
|
require 'timeout'
|
||||||
require 'timeout'
|
@tasks = @files.dup # Array of filenames.
|
||||||
@tasks = @files.dup # Array of filenames.
|
@need_quit = false
|
||||||
@need_quit = false
|
@dead_workers = [] # Array of dead workers.
|
||||||
@dead_workers = [] # Array of dead workers.
|
@warnings = []
|
||||||
@warnings = []
|
@total_tests = @tasks.size.to_s(10)
|
||||||
@total_tests = @tasks.size.to_s(10)
|
shutting_down = false
|
||||||
shutting_down = false
|
rep = [] # FIXME: more good naming
|
||||||
rep = [] # FIXME: more good naming
|
|
||||||
|
|
||||||
|
begin
|
||||||
# Array of workers.
|
# Array of workers.
|
||||||
launch_worker = Proc.new {
|
launch_worker = Proc.new {
|
||||||
begin
|
begin
|
||||||
|
Loading…
x
Reference in New Issue
Block a user