From 114c0b71be05848e4f1dafcaa3321e09f103bdaa Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 29 Feb 2024 18:05:00 +0900 Subject: [PATCH] Inform failures in parallel tests before retrying Displays for each failure which test it actually occurred in. The output destination follows the --{stdout,stderr}-on-failure option. --- tool/lib/test/unit.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tool/lib/test/unit.rb b/tool/lib/test/unit.rb index a068ae6b9d..01c53e929c 100644 --- a/tool/lib/test/unit.rb +++ b/tool/lib/test/unit.rb @@ -716,7 +716,15 @@ module Test 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)