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: --jobs-status won't puts over 2 lines.

* test/testunit/test_parallel.rb: Fix test for above.
* lib/test/*: refactoring.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
sorah 2011-02-26 07:17:59 +00:00
parent 10e2dbee16
commit 86c7e68442
4 changed files with 260 additions and 231 deletions

View file

@ -26,9 +26,9 @@ module Test
stdout = STDOUT.dup
th = Thread.new(i.dup) do |io|
th = Thread.new do
begin
while buf = (self.verbose ? io.gets : io.read(5))
while buf = (self.verbose ? i.gets : i.read(5))
stdout.puts "p #{[buf].pack("m").gsub("\n","")}"
end
rescue IOError
@ -70,13 +70,11 @@ module Test
@@stop_auto_run = true
@opts = @options.dup
STDOUT.sync = true
STDOUT.puts "ready"
Signal.trap(:INT,"IGNORE")
@old_loadpath = []
begin
STDOUT.sync = true
STDOUT.puts "ready"
stdin = STDIN.dup
stdout = STDOUT.dup
while buf = stdin.gets
@ -123,6 +121,7 @@ module Test
exit
end
end
rescue Errno::EPIPE
rescue Exception => e
begin
STDOUT.puts "bye #{[Marshal.dump(e)].pack("m").gsub("\n","")}"