From f5c191f93a1064dfa3eb039447813296f95c492a Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Sun, 10 Aug 2025 09:23:50 -0400 Subject: [PATCH 1/2] progress counter --- .github/workflows/frontier/submit.sh | 2 +- toolchain/mfc/test/test.py | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/frontier/submit.sh b/.github/workflows/frontier/submit.sh index 7c4cb059ba..ab094b81b6 100644 --- a/.github/workflows/frontier/submit.sh +++ b/.github/workflows/frontier/submit.sh @@ -29,7 +29,7 @@ job_slug="`basename "$1" | sed 's/\.sh$//' | sed 's/[^a-zA-Z0-9]/-/g'`-$2" sbatch < typing.List[TestCase]: def test(): # pylint: disable=global-statement, global-variable-not-assigned - global nFAIL, nPASS, nSKIP + global nFAIL, nPASS, nSKIP, total_test_count global errors cases = list_cases() @@ -113,6 +115,7 @@ def test(): cases, skipped_cases = __filter(cases) cases = [ _.to_case() for _ in cases ] + total_test_count = len(cases) if ARG("list"): table = rich.table.Table(title="MFC Test Cases", box=rich.table.box.SIMPLE) @@ -150,7 +153,7 @@ def test(): # Run cases with multiple threads (if available) cons.print() - cons.print(" tests/[bold magenta]UUID[/bold magenta] (s) Summary") + cons.print(" Progress [bold magenta]UUID[/bold magenta] (s) Summary") cons.print() # Select the correct number of threads to use to launch test cases @@ -185,6 +188,7 @@ def test(): # pylint: disable=too-many-locals, too-many-branches, too-many-statements, trailing-whitespace def _handle_case(case: TestCase, devices: typing.Set[int]): # pylint: disable=global-statement, global-variable-not-assigned + global current_test_number start_time = time.time() tol = case.compute_tolerance() @@ -269,7 +273,9 @@ def _handle_case(case: TestCase, devices: typing.Set[int]): end_time = time.time() duration = end_time - start_time - cons.print(f" [bold magenta]{case.get_uuid()}[/bold magenta] {duration:6.2f} {case.trace}") + current_test_number += 1 + progress_str = f"({current_test_number:3d}/{total_test_count:3d})" + cons.print(f" {progress_str} [bold magenta]{case.get_uuid()}[/bold magenta] {duration:6.2f} {case.trace}") def handle_case(case: TestCase, devices: typing.Set[int]): From 14ad2da10727700a6d2383462ab7bb3ead77650f Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Sun, 10 Aug 2025 18:05:25 -0400 Subject: [PATCH 2/2] Update submit.sh --- .github/workflows/frontier/submit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/frontier/submit.sh b/.github/workflows/frontier/submit.sh index ab094b81b6..8a4ce336c8 100644 --- a/.github/workflows/frontier/submit.sh +++ b/.github/workflows/frontier/submit.sh @@ -33,7 +33,7 @@ sbatch <