(test_phase_secs: float | None, test_phase_note: str = "")
| 423 | lint_secs = lint_duration[0] if lint_duration else 0.0 |
| 424 | |
| 425 | def _emit_timing(test_phase_secs: float | None, test_phase_note: str = "") -> None: |
| 426 | total = time.perf_counter() - overall_start |
| 427 | if test_phase_secs is not None: |
| 428 | test_part = _fmt_seconds(test_phase_secs) |
| 429 | else: |
| 430 | test_part = "0s" |
| 431 | suffix = f" ({test_phase_note})" if test_phase_note else "" |
| 432 | meson_note = "" if run_meson_stage else " (meson stage skipped)" |
| 433 | print( |
| 434 | f"[stop-hook] lint={_fmt_seconds(lint_secs)}{meson_note} " |
| 435 | f"test={test_part}{suffix} total={_fmt_seconds(total)}", |
| 436 | file=sys.stderr, |
| 437 | ) |
| 438 | |
| 439 | if lint_result.returncode != 0: |
| 440 | # Lint failed - cancel tests, report lint errors only. |
no test coverage detected