mirror of
https://github.com/hathach/tinyusb.git
synced 2026-08-18 11:02:16 +00:00
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) <noreply@anthropic.com>
This commit is contained in:
@ -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:
|
||||
|
||||
Reference in New Issue
Block a user