summaryrefslogtreecommitdiff
path: root/test/lib/test
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-30 19:28:58 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-30 19:28:58 +0000
commit7973ff4fe6f0e695487f12a4301ab68738825786 (patch)
tree315372ed229e647090b7d0b48445a4cd173075de /test/lib/test
parent1d0fbdb92e0d77f1061b0bd92472f8cf888a5579 (diff)
show if parallel test-all fails to Marshal.load
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/lib/test')
-rw-r--r--test/lib/test/unit.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/lib/test/unit.rb b/test/lib/test/unit.rb
index 12e4338..2f7ad48 100644
--- a/test/lib/test/unit.rb
+++ b/test/lib/test/unit.rb
@@ -533,7 +533,7 @@ module Test
def deal(io, type, result, rep, shutting_down = false)
worker = @workers_hash[io]
- case worker.read
+ case cmd = worker.read
when /^okay$/
worker.status = :running
jobs_status
@@ -551,7 +551,12 @@ module Test
jobs_status
when /^done (.+?)$/
- r = Marshal.load($1.unpack("m")[0])
+ begin
+ r = Marshal.load($1.unpack("m")[0])
+ rescue
+ print "unknown object: #{$1.unpack("m")[0].dump}"
+ return false
+ end
result << r[0..1] unless r[0..1] == [nil,nil]
rep << {file: worker.real_file, report: r[2], result: r[3], testcase: r[5]}
$:.push(*r[4]).uniq!
@@ -570,6 +575,8 @@ module Test
else
after_worker_down worker
end
+ else
+ print "unknown command: #{cmd.dump}"
end
return false
end