diff --git a/README.md b/README.md index 796d077..cf8784f 100644 --- a/README.md +++ b/README.md @@ -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 | diff --git a/client/e2e/run.sh b/client/e2e/run.sh index a5cf723..83ba6d5 100755 --- a/client/e2e/run.sh +++ b/client/e2e/run.sh @@ -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() { # + 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"