test-runner.sh
Pretty umbrella runner for every host-side suite: one banner, live per-check…
Overview
Pretty umbrella runner for every host-side suite: one banner, live per-check rows, a per-suite summary table, and suite timings. The suites themselves are unchanged — this only orchestrates and renders their existing output: firmware (C host) tests/host/run.sh the KAT suite + the lab python suite shared core (C host) ports/esp32/test/run.sh reader/stepup/crypto/... stages web twin scripts/twin-suite.sh constant-drift gate + WASM selftest Default: suites run in parallel, output replayed in order when done. SERIAL=1 streams them live, one at a time. SUITES="firmware shared" scopes. Exit is nonzero if any suite fails. Colour off when not a TTY or NO_COLOR.
flowchart TD banner --> boxed banner --> center banner --> hr
API
Fhr()
Repeat a character N times.
bannerFdlen()
Display length of a string in characters (multibyte-aware), excluding ANSI codes.
centerFcenter()
Center text to display width with even padding on both sides.
banner · calls dlenFboxed()
Print one row: cyan borders, bold box-draw characters, and content centered/left-aligned to display width.
banner, rowFbanner()
Print the test runner banner: title, subtitle, and colored box-draw frame across the display width.
boxed, center, hrFsuite_cmd()
---- suite definitions ----------------------------------------------------
run_suiteFsuite_label()
Return the human-readable label for a suite name.
run_suiteFsuite_counts()
passed/failed counts from a suite's captured output. Harnesses differ, so count the universal per-check rows plus each harness's own totals line.
run_suiteFrender_line()
live rendering of one suite output line (streaming + replay)
run_suiteFrun_suite()
Run one test suite: spawn the suite command, optionally stream output line-by-line in serial mode, capture exit code and timing. Write test counts (passed/failed) and metadata to the metafile.
render_line, suite_cmd, suite_counts, suite_labelFrow()
---- summary table -------------------------------------------------------- Row layout (plain widths sum to W_IN=66): ' ' mark(1) ' ' label(24) ' ' passed(6) ' ' failed(6) ' ' time(8) pad(12)
boxed