1919nFAIL = 0
2020nPASS = 0
2121nSKIP = 0
22+ current_test_number = 0
23+ total_test_count = 0
2224errors = []
2325
2426# pylint: disable=too-many-branches, trailing-whitespace
@@ -95,7 +97,7 @@ def __filter(cases_) -> typing.List[TestCase]:
9597
9698def test ():
9799 # pylint: disable=global-statement, global-variable-not-assigned
98- global nFAIL , nPASS , nSKIP
100+ global nFAIL , nPASS , nSKIP , total_test_count
99101 global errors
100102
101103 cases = list_cases ()
@@ -113,6 +115,7 @@ def test():
113115
114116 cases , skipped_cases = __filter (cases )
115117 cases = [ _ .to_case () for _ in cases ]
118+ total_test_count = len (cases )
116119
117120 if ARG ("list" ):
118121 table = rich .table .Table (title = "MFC Test Cases" , box = rich .table .box .SIMPLE )
@@ -150,7 +153,7 @@ def test():
150153
151154 # Run cases with multiple threads (if available)
152155 cons .print ()
153- cons .print (" tests/ [bold magenta]UUID[/bold magenta] (s) Summary" )
156+ cons .print (" Progress [bold magenta]UUID[/bold magenta] (s) Summary" )
154157 cons .print ()
155158
156159 # Select the correct number of threads to use to launch test cases
@@ -185,6 +188,7 @@ def test():
185188# pylint: disable=too-many-locals, too-many-branches, too-many-statements, trailing-whitespace
186189def _handle_case (case : TestCase , devices : typing .Set [int ]):
187190 # pylint: disable=global-statement, global-variable-not-assigned
191+ global current_test_number
188192 start_time = time .time ()
189193
190194 tol = case .compute_tolerance ()
@@ -269,7 +273,9 @@ def _handle_case(case: TestCase, devices: typing.Set[int]):
269273 end_time = time .time ()
270274 duration = end_time - start_time
271275
272- cons .print (f" [bold magenta]{ case .get_uuid ()} [/bold magenta] { duration :6.2f} { case .trace } " )
276+ current_test_number += 1
277+ progress_str = f"({ current_test_number :3d} /{ total_test_count :3d} )"
278+ cons .print (f" { progress_str } [bold magenta]{ case .get_uuid ()} [/bold magenta] { duration :6.2f} { case .trace } " )
273279
274280
275281def handle_case (case : TestCase , devices : typing .Set [int ]):
0 commit comments