File tree Expand file tree Collapse file tree 2 files changed +22
-14
lines changed Expand file tree Collapse file tree 2 files changed +22
-14
lines changed Original file line number Diff line number Diff line change @@ -320,6 +320,10 @@ impl ComparisonSummary {
320320 self . comparisons . is_empty ( )
321321 }
322322
323+ pub fn errors_in ( & self ) -> & [ String ] {
324+ & self . errors_in
325+ }
326+
323327 fn arithmetic_mean < ' a > (
324328 & ' a self ,
325329 changes : impl Iterator < Item = & ' a TestResultComparison > ,
@@ -500,20 +504,6 @@ pub fn write_summary_table(
500504 )
501505 . unwrap ( ) ;
502506
503- if !primary. errors_in . is_empty ( ) {
504- write ! (
505- result,
506- "\n The following benchmark(s) failed to build:\n {}\n " ,
507- primary
508- . errors_in
509- . iter( )
510- . map( |benchmark| format!( "- {benchmark}" ) )
511- . collect:: <Vec <_>>( )
512- . join( "\n " )
513- )
514- . unwrap ( ) ;
515- }
516-
517507 if with_footnotes {
518508 writeln ! (
519509 result,
Original file line number Diff line number Diff line change @@ -701,6 +701,24 @@ async fn categorize_benchmark(
701701 secondary. unwrap_or_else ( || ComparisonSummary :: empty ( ) ) ,
702702 ) ;
703703 write_summary_table ( & primary, & secondary, true , & mut result) ;
704+
705+ if !primary. errors_in ( ) . is_empty ( ) || !secondary. errors_in ( ) . is_empty ( ) {
706+ let list_errored_benchmarks = |summary : ComparisonSummary | {
707+ summary
708+ . errors_in ( )
709+ . iter ( )
710+ . map ( |benchmark| format ! ( "- {benchmark}" ) )
711+ . collect :: < Vec < _ > > ( )
712+ . join ( "\n " )
713+ } ;
714+ write ! (
715+ result,
716+ "\n The following benchmark(s) failed to build:\n {}{}\n " ,
717+ list_errored_benchmarks( primary) ,
718+ list_errored_benchmarks( secondary)
719+ )
720+ . unwrap ( ) ;
721+ }
704722 }
705723
706724 write ! ( result, "\n {}" , DISAGREEMENT ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments