mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/test/unit.rb(Test::Unit::Runner#after_worker_quit):
method name more be natural English. * lib/test/unit.rb(Test::Unit::Runner::Worker.launch): IO.sync doesn't need. Should use "b" for mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f0f7079d48
commit
04ccb2fee2
2 changed files with 13 additions and 6 deletions
|
@ -1,3 +1,11 @@
|
|||
Mon Feb 28 07:28:35 2011 Shota Fukumori <sorah@tubusu.net>
|
||||
|
||||
* lib/test/unit.rb(Test::Unit::Runner#after_worker_quit):
|
||||
method name more be natural English.
|
||||
|
||||
* lib/test/unit.rb(Test::Unit::Runner::Worker.launch):
|
||||
IO.sync doesn't need. Should use "b" for mode.
|
||||
|
||||
Sun Feb 27 21:59:37 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* test/ruby/test_system.rb (TestSystem#test_system_redirect_win):
|
||||
|
|
|
@ -233,8 +233,7 @@ module Test
|
|||
def self.launch(ruby,args=[])
|
||||
io = IO.popen([*ruby,
|
||||
"#{File.dirname(__FILE__)}/unit/parallel.rb",
|
||||
*args], "r+")
|
||||
io.sync = true
|
||||
*args], "rb+")
|
||||
new(io: io, pid: io.pid, status: :waiting)
|
||||
end
|
||||
|
||||
|
@ -353,7 +352,7 @@ module Test
|
|||
puts "" unless @opts[:verbose]
|
||||
status_line = @workers.map(&:to_s).join(" ")
|
||||
if @opts[:job_status] == :replace
|
||||
@terminal_width ||= $stdout.winsize[1] || ENV["COLUMNS"] || 80
|
||||
@terminal_width ||= $stdout.winsize[1] || ENV["COLUMNS"].to_i || 80
|
||||
@jstr_size ||= 0
|
||||
del_jobs_status
|
||||
$stdout.flush
|
||||
|
@ -371,7 +370,7 @@ module Test
|
|||
print "\r"+" "*@jstr_size+"\r"
|
||||
end
|
||||
|
||||
def after_worker_dead(worker)
|
||||
def after_worker_quit(worker)
|
||||
return unless @opts[:parallel]
|
||||
return if @interrupt
|
||||
@workers.delete(worker)
|
||||
|
@ -395,7 +394,7 @@ module Test
|
|||
@workers = @opts[:parallel].times.map {
|
||||
worker = Worker.launch(@opts[:ruby],@args)
|
||||
worker.hook(:dead) do |w,info|
|
||||
after_worker_dead w
|
||||
after_worker_quit w
|
||||
after_worker_down w, *info unless info.empty?
|
||||
end
|
||||
worker
|
||||
|
@ -450,7 +449,7 @@ module Test
|
|||
after_worker_down worker, Marshal.load($1.unpack("m")[0])
|
||||
when /^bye$/
|
||||
if shutting_down
|
||||
after_worker_dead worker
|
||||
after_worker_quit worker
|
||||
else
|
||||
after_worker_down worker
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue