Bug #6897 ยป 0001-Fix-parallel-test-no-retry-option.patch
| lib/test/unit.rb | ||
|---|---|---|
|
_run_suites(suites, type)
|
||
|
end
|
||
|
end
|
||
|
unless @options[:retry]
|
||
|
del_status_line or puts
|
||
|
end
|
||
|
unless rep.empty?
|
||
|
rep.each do |r|
|
||
|
r[:report].each do |f|
|
||
|
report.push(puke(*f)) if f
|
||
|
puke(*f) if f
|
||
|
end
|
||
|
end
|
||
|
@errors += rep.map{|x| x[:result][0] }.inject(:+)
|
||
|
@failures += rep.map{|x| x[:result][1] }.inject(:+)
|
||
|
@skips += rep.map{|x| x[:result][2] }.inject(:+)
|
||
|
if @options[:retry]
|
||
|
@errors += rep.map{|x| x[:result][0] }.inject(:+)
|
||
|
@failures += rep.map{|x| x[:result][1] }.inject(:+)
|
||
|
@skips += rep.map{|x| x[:result][2] }.inject(:+)
|
||
|
end
|
||
|
end
|
||
|
unless @warnings.empty?
|
||
|
warn ""
|
||
| ... | ... | |
|
new(*args).run
|
||
|
end
|
||
|
end
|
||
|
class ProxyException < Exception
|
||
|
def initialize(e)
|
||
|
@class = e.class.name
|
||
|
@message = e.message
|
||
|
@backtrace = e.backtrace
|
||
|
end
|
||
|
# these methods are used in MiniTest::Unit#puke
|
||
|
attr_accessor :class, :message, :backtrace
|
||
|
end
|
||
|
end
|
||
|
end
|
||
| lib/test/unit/parallel.rb | ||
|---|---|---|
|
end
|
||
|
def puke(klass, meth, e)
|
||
|
if !e.is_a?(MiniTest::Assertion) && e.is_a?(Exception)
|
||
|
# Create a fake Exception to avoid Marshal.load
|
||
|
# of Exception subclass failing.
|
||
|
e = ProxyException.new(e)
|
||
|
end
|
||
|
@partial_report << [klass.name, meth, e]
|
||
|
super
|
||
|
end
|
||