diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/test/unit.rb | 6 | ||||
-rw-r--r-- | lib/test/unit/parallel.rb | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/lib/test/unit.rb b/lib/test/unit.rb index e96ec558eb..a0902acb8b 100644 --- a/lib/test/unit.rb +++ b/lib/test/unit.rb @@ -370,11 +370,7 @@ module Test def after_worker_down(worker, e=nil, c=false) return unless @options[:parallel] return if @interrupt - if e - b = e.backtrace - warn "#{b.shift}: #{e.message} (#{e.class})" - STDERR.print b.map{|s| "\tfrom #{s}"}.join("\n") - end + warn e if e @need_quit = true warn "" warn "Some worker was crashed. It seems ruby interpreter's bug" diff --git a/lib/test/unit/parallel.rb b/lib/test/unit/parallel.rb index 232aa44151..32f15382ec 100644 --- a/lib/test/unit/parallel.rb +++ b/lib/test/unit/parallel.rb @@ -137,7 +137,10 @@ module Test rescue Errno::EPIPE rescue Exception => e begin - _report "bye", Marshal.dump(e) + trace = e.backtrace + err = ["#{trace.shift}: #{e.message} (#{e.class})"] + trace.map{|t| t.prepend("\t") } + + _report "bye", Marshal.dump(err.join("\n")) rescue Errno::EPIPE;end exit ensure |