diff options
| author | hathach <[email protected]> | 2026-06-24 15:44:26 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2026-06-24 16:42:04 +0700 |
| commit | f8314e3336ca530ac7bb0857b3143922a869aeaf (patch) | |
| tree | af057d104744a473f0e67a283501e073386b45dd | |
| parent | bc9cf55927d2dcd633350316f9b1f8b40a30a7be (diff) | |
test/hil: show pass/fail/skip counts above the HIL report table
Prefix each rig's hil_report.md matrix with a one-line tally
(passed / failed / skipped) so the number of failed tests is visible at a
glance in the PR comment without scanning the table. A metric-string cell
(e.g. throughput) counts as a pass; blank/not-run cells are excluded.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
| -rwxr-xr-x | test/hil/hil_test.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/hil/hil_test.py b/test/hil/hil_test.py index 07375c1ad..e66c86e56 100755 --- a/test/hil/hil_test.py +++ b/test/hil/hil_test.py @@ -1756,8 +1756,14 @@ def render_matrix(rows_all: list) -> str: sep = '| ' + '-' * board_w + ' | ' + ' | '.join(':' + '-' * (w - 2) + ':' for w in col_w) + ' |' body = [line(lbl, [cell(cells, c) for c in columns]) for lbl, cells in rows_all] - legend = 'Legend: ✅ pass · ❌ fail · ⚪ skipped · blank not run' - return '\n'.join([header, sep] + body) + '\n\n' + legend + # tally run cells (blank/not-run cells are absent from the dicts); a metric string counts as pass + failed = sum(v == 'fail' for _, cells in rows_all for v in cells.values()) + skipped = sum(v == 'skip' for _, cells in rows_all for v in cells.values()) + passed = sum(v not in ('fail', 'skip') for _, cells in rows_all for v in cells.values()) + summary = (f'**{REPORT_CELL["pass"]} {passed} passed · {REPORT_CELL["fail"]} {failed} failed · ' + f'{REPORT_CELL["skip"]} {skipped} skipped · blank not run**') + + return summary + '\n\n' + '\n'.join([header, sep] + body) def accumulate_report(mret: list, report_dir: Path, fresh: bool) -> str: |
