1919nFAIL = 0
2020nPASS = 0
2121nSKIP = 0
22+ errors = []
2223
2324def __filter (cases_ ) -> typing .List [TestCase ]:
2425 cases = cases_ [:]
@@ -61,6 +62,7 @@ def __filter(cases_) -> typing.List[TestCase]:
6162def test ():
6263 # pylint: disable=global-statement, global-variable-not-assigned
6364 global nFAIL , nPASS , nSKIP
65+ global errors
6466
6567 cases = list_cases ()
6668
@@ -125,6 +127,9 @@ def test():
125127 [ sched .Task (ppn = case .ppn , func = handle_case , args = [case ], load = case .get_cell_count ()) for case in cases ],
126128 ARG ("jobs" ), ARG ("gpus" ))
127129
130+ for e in errors :
131+ cons .print (e )
132+
128133 cons .print ()
129134 cons .unindent ()
130135 cons .print (f"\n Test Summary: [bold green]{ nPASS } [/bold green] passed, [bold red]{ nFAIL } [/bold red] failed, [bold yellow]{ nSKIP } [/bold yellow] skipped." )
@@ -216,6 +221,7 @@ def _handle_case(case: TestCase, devices: typing.Set[int]):
216221def handle_case (case : TestCase , devices : typing .Set [int ]):
217222 # pylint: disable=global-statement, global-variable-not-assigned
218223 global nFAIL , nPASS , nSKIP
224+ global errors
219225
220226 nAttempts = 0
221227
@@ -228,9 +234,11 @@ def handle_case(case: TestCase, devices: typing.Set[int]):
228234 except Exception as exc :
229235 if nAttempts < ARG ("max_attempts" ):
230236 cons .print (f"[bold yellow] Attempt { nAttempts } : Failed test { case .get_uuid ()} . Retrying...[/bold yellow]" )
237+ errors .append (f"[bold yellow] Attempt { nAttempts } : Failed test { case .get_uuid ()} . Retrying...[/bold yellow]" )
231238 continue
232239 nFAIL += 1
233240 cons .print (f"[bold red]Failed test { case } after { nAttempts } attempt(s).[/bold red]" )
234- cons .print (f"{ exc } " )
241+ errors .append (f"[bold red]Failed test { case } after { nAttempts } attempt(s).[/bold red]" )
242+ errors .append (f"{ exc } " )
235243
236244 return
0 commit comments