tools: Node 26 harness base, smoke and ws-header checks (#16)

This commit is contained in:
2026-11-14 21:40:44 +01:00
parent f376efdc39
commit 65b8f0a148
6 changed files with 338 additions and 1 deletions
+2 -1
View File
@@ -14,6 +14,7 @@
# Ctrl-C / TERM / EXIT: kills all jobs and removes the temp dir (fffmut.* under $TMPDIR or /tmp).
# Log: results/mutation.log
cd "$(dirname "$0")/.." || exit 1
PKGS=${NIMBLE_DIR:-$PWD/.devbox/nimble}/pkgs2 # mummy/db_connector for the new server modules
job() { # runs in its own session: $1 id $2 title $3 file to mutate $4 sed script ("" = control) $5 expected-failure regex
local id=$1 title=$2 file=$3 sedscr=$4 expect=$5 w=$T/$1/w res=$T/$1/res tfs tf out=$T/$1/out r=0 rr F verdict=ok rc=0
mkdir -p "$w"; cp -r server tests tools nim.cfg "$w"/
@@ -30,7 +31,7 @@ job() { # runs in its own session: $1 id $2 title $3 file to mutate $4 sed s
else tfs=$(ls tests/t*.nim); fi
: > "$out"
for tf in $tfs; do
(cd "$w" && nim c -r --hints:off --nimcache:"$T/$id/nc-$(basename "$tf" .nim)" "$tf") >> "$out" 2>&1; rr=$?
(cd "$w" && nim c -r --hints:off --nimblePath:"$PKGS" --nimcache:"$T/$id/nc-$(basename "$tf" .nim)" "$tf") >> "$out" 2>&1; rr=$?
[ $rr -eq 0 ] || r=$rr
done
grep -E '\[(OK|FAILED)\]|Success|Failure|Error' "$out" | sed 's/^ *\.* */ /' >> "$res"