diff options
author | sorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-02-26 07:17:59 +0000 |
---|---|---|
committer | sorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-02-26 07:17:59 +0000 |
commit | 86c7e68442b560e1c743d77d0783bc29a577790f (patch) | |
tree | 288b14010abb8bb1dcc9e2ff6b1a958de7dd7204 /lib/test/unit | |
parent | 10e2dbee16845d632ab81579db76d8356f33cca0 (diff) | |
download | ruby-86c7e68442b560e1c743d77d0783bc29a577790f.tar.gz |
* 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
Diffstat (limited to 'lib/test/unit')
-rw-r--r-- | lib/test/unit/parallel.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/test/unit/parallel.rb b/lib/test/unit/parallel.rb index ae1bf2961c..80dd4eae56 100644 --- a/lib/test/unit/parallel.rb +++ b/lib/test/unit/parallel.rb @@ -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","")}" |