test(e2e): print combined total across serial and parallel groups

This commit is contained in:
2026-11-21 22:57:21 +01:00
parent a79d809394
commit f170b9c91a
2 changed files with 18 additions and 1 deletions
+1 -1
View File
@@ -364,7 +364,7 @@ were present in both.
|---|---|---|---|
| `devbox run test` | 44 s | 91 s | 419 Nim checks + 172 Node tests; the 22 fault cases are sharded, the rest fan out at `FFF_TEST_JOBS` |
| `devbox run client-test` | 0.8 s | 0.8 s | Vitest reducer/protocol seam, no build |
| `devbox run e2e` | 157 s | 166 s | 29 browser tests; the client build runs every time; timing-gate files stay serial |
| `devbox run e2e` | 157 s | 166 s | 31 browser tests; the client build runs every time; timing-gate files stay serial; ends with one `e2e total:` line (in `results/e2e.log` too) |
| **pre-push total** | **≈202 s** | **≈258 s** | `test` + `client-test` + `e2e` |
| `devbox run mutation` | 500 s | — | 81 mutations (control + 80) on temp copies; `MUTATION_JOBS` defaults to nproc/4 |
| `devbox run bench` | 8 s | — | release build plus the vision/egress run |
+17
View File
@@ -41,4 +41,21 @@ node --test --test-concurrency="$JOBS" --test-reporter=spec "${E2E_PARALLEL[@]}"
> run/logs/e2e-parallel.log 2>&1 || rc=$?
cat run/logs/e2e-serial.log run/logs/e2e-parallel.log > results/e2e.log
cat results/e2e.log
# Each group's spec reporter ends with its own summary. Print one combined line so a reader (or an
# agent) cannot mistake the parallel group's "N pass" for the suite total; it is the last line of
# results/e2e.log too. Field names are matched from the end so the leading "ℹ" is irrelevant.
summary_field() { # <tests|pass|fail|skipped> <log>
awk -v k="$1" 'NF >= 2 && $(NF-1) == k && $NF ~ /^[0-9]+$/ { v = $NF } END { print v + 0 }' "$2"
}
S_TESTS=$(summary_field tests run/logs/e2e-serial.log)
S_PASS=$(summary_field pass run/logs/e2e-serial.log)
S_FAIL=$(summary_field fail run/logs/e2e-serial.log)
S_SKIP=$(summary_field skipped run/logs/e2e-serial.log)
P_TESTS=$(summary_field tests run/logs/e2e-parallel.log)
P_PASS=$(summary_field pass run/logs/e2e-parallel.log)
P_FAIL=$(summary_field fail run/logs/e2e-parallel.log)
P_SKIP=$(summary_field skipped run/logs/e2e-parallel.log)
printf 'e2e total: tests %d / pass %d / fail %d / skip %d (serial %d, parallel %d)\n' \
"$((S_TESTS + P_TESTS))" "$((S_PASS + P_PASS))" "$((S_FAIL + P_FAIL))" \
"$((S_SKIP + P_SKIP))" "$S_TESTS" "$P_TESTS" | tee -a results/e2e.log
[ "${rc:-0}" -eq 0 ] || exit "$rc"