@@ -159,12 +159,8 @@ var RunTestsCmd = &cobra.Command{
159159 os .Exit (ErrorExitCode )
160160 }
161161
162- // Filter tests that failed after reruns
163- failedAfterRerun := reports .FilterTests (rerunReport .Results , func (tr reports.TestResult ) bool {
164- return ! tr .Skipped && tr .Successes == 0
165- })
166- fmt .Printf ("\n Flakeguard Rerun Summary:\n " )
167- reports .PrintTestTable (os .Stdout , * rerunReport , false , false )
162+ fmt .Printf ("\n All Rerun Tests:\n " )
163+ reports .PrintTestResultsTable (os .Stdout , rerunReport .Results , false , false )
168164 fmt .Println ()
169165
170166 // Save the rerun test report to file
@@ -176,14 +172,22 @@ var RunTestsCmd = &cobra.Command{
176172 log .Info ().Str ("path" , rerunReportPath ).Msg ("Rerun test report saved" )
177173 }
178174
175+ // Filter tests that failed after reruns
176+ failedAfterRerun := reports .FilterTests (rerunReport .Results , func (tr reports.TestResult ) bool {
177+ return ! tr .Skipped && tr .Successes == 0
178+ })
179+
179180 if len (failedAfterRerun ) > 0 {
181+ fmt .Println ("\n Tests That Failed All Reruns:" )
182+ reports .PrintTestResultsTable (os .Stdout , failedAfterRerun , false , false )
183+ fmt .Println ()
180184 log .Error ().
181- Int ("tests " , len (failedAfterRerun )).
185+ Int ("noSuccessTests " , len (failedAfterRerun )).
182186 Int ("reruns" , rerunFailedCount ).
183- Msg ("Tests still failing after reruns with 0 successes " )
187+ Msg ("Some tests are still failing after multiple reruns with no successful attempts. " )
184188 os .Exit (ErrorExitCode )
185189 } else {
186- log .Info ().Msg ("Tests that failed passed at least once after reruns" )
190+ log .Info ().Msg ("All tests passed at least once after reruns" )
187191 os .Exit (0 )
188192 }
189193 } else {
0 commit comments