- tools/groups.mjs evidence entries now name the exact test, a minimum assertion count and the calls its body must keep; groups.test.mjs checks all three. - tools/evidence.mjs parses the spec reporter log and fails the gate unless every registered evidence test ran and passed; test.sh runs it after the Node suite. - restart.test.mjs snapshots the live as-built world on the first server, then compares it to the post-SIGTERM/SIGKILL state (players connect before the GM, so the GM's derived encountered grey is computed on both sides). - Negative controls: a hollowed auth test fails the new evidence check; a planted first-load drop of a token's gm prop bucket fails the new restart baseline while the old restart-to-restart test passed. - Refresh the gate evidence (control + 73 mutations incl. s1-s7, 142 node tests).
21 lines
1.0 KiB
Bash
Executable File
21 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# devbox run test: Nim in-process tests first, then the Node black-box harnesses (DESIGN 10.4).
|
|
# Nim gates Node: a red Nim suite stops the run (the Node stage takes seconds, but no point).
|
|
# Logs land in results/ like the other gates.
|
|
cd "$(dirname "$0")/.." || exit 1
|
|
mkdir -p results
|
|
if ! nimble test -y > results/nimble-test.log 2>&1; then
|
|
cat results/nimble-test.log
|
|
exit 1
|
|
fi
|
|
cat results/nimble-test.log
|
|
# One file at a time: every harness builds and runs the same real binary (run/test/server) and
|
|
# starts real servers; serialising removes build/write races. Ports and state dirs are isolated.
|
|
node --test --test-concurrency=1 --test-reporter=spec tools/*.test.mjs > results/node-test.log 2>&1
|
|
rc=$?
|
|
cat results/node-test.log
|
|
[ $rc -eq 0 ] || exit $rc
|
|
# #36: the group map's evidence is only proof if the named tests actually ran and passed. This is a
|
|
# separate post-run step because groups.test.mjs runs inside the suite it would have to inspect.
|
|
node tools/evidence.mjs results/node-test.log || exit 1
|