Skip to content

Commit 2e1eb87

Browse files
committed
minor
1 parent 8c01b99 commit 2e1eb87

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

toolchain/mfc/test/test.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -330,15 +330,17 @@ def handle_case(case: TestCase, devices: typing.Set[int]):
330330
errors.append(f"{exc}")
331331

332332
# Check if we should abort early due to high failure rate
333-
total_completed = nFAIL + nPASS
334-
if total_completed >= MIN_CASES_BEFORE_ABORT:
335-
failure_rate = nFAIL / total_completed
336-
if failure_rate >= FAILURE_RATE_THRESHOLD:
337-
cons.print(f"\n[bold red]CRITICAL: {failure_rate*100:.1f}% failure rate detected after {total_completed} tests.[/bold red]")
338-
cons.print(f"[bold red]This suggests a systemic issue (bad build, broken environment, etc.)[/bold red]")
339-
cons.print(f"[bold red]Aborting remaining tests to fail fast.[/bold red]\n")
340-
raise MFCException(
341-
f"Excessive test failures: {nFAIL}/{total_completed} failed ({failure_rate*100:.1f}%)"
342-
)
333+
# Skip this check during dry-run (only builds, doesn't run tests)
334+
if not ARG("dry_run"):
335+
total_completed = nFAIL + nPASS
336+
if total_completed >= MIN_CASES_BEFORE_ABORT:
337+
failure_rate = nFAIL / total_completed
338+
if failure_rate >= FAILURE_RATE_THRESHOLD:
339+
cons.print(f"\n[bold red]CRITICAL: {failure_rate*100:.1f}% failure rate detected after {total_completed} tests.[/bold red]")
340+
cons.print(f"[bold red]This suggests a systemic issue (bad build, broken environment, etc.)[/bold red]")
341+
cons.print(f"[bold red]Aborting remaining tests to fail fast.[/bold red]\n")
342+
raise MFCException(
343+
f"Excessive test failures: {nFAIL}/{total_completed} failed ({failure_rate*100:.1f}%)"
344+
)
343345

344346
return

0 commit comments

Comments
 (0)