Skip to content

Commit

Permalink
Inform failures in parallel tests before retrying
Browse files Browse the repository at this point in the history
Displays for each failure which test it actually occurred in.  The
output destination follows the --{stdout,stderr}-on-failure option.
  • Loading branch information
nobu committed Feb 29, 2024
1 parent 51e3252 commit 114c0b7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tool/lib/test/unit.rb
Expand Up @@ -716,7 +716,15 @@ def _run_parallel suites, type, result
del_status_line or puts
error, suites = suites.partition {|r| r[:error]}
unless suites.empty?
puts "\n""Retrying..."
puts "\n"
@failed_output.puts "Failed tests:"
suites.each {|r|
r[:report].each {|c, m, e|
@failed_output.puts "#{c}##{m}: #{e&.class}: #{e&.message&.slice(/\A.*/)}"
}
}
@failed_output.puts "\n"
puts "Retrying..."
@verbose = options[:verbose]
suites.map! {|r| ::Object.const_get(r[:testcase])}
_run_suites(suites, type)
Expand Down

0 comments on commit 114c0b7

Please sign in to comment.