Files
jason.woltje 4ff4f44c98 lead: commit researcher's untracked evidence (1406 files: queue-101 queue-105 queue-128 queue-134 queue-143 queue-148 queue-183 queue-228)
Unclaimed files left in the canonical checkout. Inventory: canonical-cleanup-inventory.md (commit-as-evidence groups). detect-secrets scan clean on 2026-11-02: hits are sha256 pins, git object ids, test sentinels already in tracked tests and unit-file lines.
2026-11-02 15:05:14 -06:00

37 lines
2.2 KiB
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# Row 134 (#1669): the owner's gate, run in the given worktree, every output teed to <outdir>.
# Singles for each changed or path-reading test file, then the node suites, then every scripts/test-*.sh.
# Docker networks and containers present before the run are recorded; only new ones are removed at exit.
# Usage: suites.sh <worktree> <outdir>
set -u -o pipefail
WT=$(cd "$1" && pwd); OUT=$(mkdir -p "$2" && cd "$2" && pwd)
cd "$WT" || exit 2
docker network ls --format '{{.Name}}' | sort > "$OUT/networks-before.txt"
docker ps -aq | sort > "$OUT/containers-before.txt"
cleanup() {
docker network ls --format '{{.Name}}' | sort > "$OUT/networks-after.txt"
comm -13 "$OUT/networks-before.txt" "$OUT/networks-after.txt" | while read -r n; do docker network rm "$n" >/dev/null 2>&1 && echo "removed new network $n"; done
docker ps -aq | sort > "$OUT/containers-after.txt"
echo "new containers left: $(comm -13 "$OUT/containers-before.txt" "$OUT/containers-after.txt" | wc -l)"
}
trap cleanup EXIT
mkdir -p "$OUT/singles"
for f in packages/bus/tests/chief-of-staff.test.mjs packages/bus/tests/routes-verb.test.mjs packages/bus/tests/instances-verb.test.mjs \
packages/business/tests/chief-of-staff.test.mjs packages/business/tests/workflow-roles.test.mjs packages/business/tests/role.test.mjs \
packages/harness/tests/tools.test.mjs packages/harness/tests/bundle.test.mjs packages/harness/tests/runner.test.mjs; do
n=$(echo "$f" | tr / _)
( cd "$(dirname "$(dirname "$f")")" && setsid -w timeout -k 10 600 node --test "tests/$(basename "$f")" ) > "$OUT/singles/$n.txt" 2>&1
echo "single $f: rc=$? $(grep -E '^ℹ (tests|pass|fail) ' "$OUT/singles/$n.txt" | tr '\n' ' ')"
done
node_suite() { # name dir
setsid -w timeout -k 10 1500 node --test "$2"/tests/*.test.mjs 2>&1 | tee "$OUT/$1.txt" >/dev/null
echo "$1: rc=${PIPESTATUS[0]} $(grep -E '^ℹ (tests|pass|fail) ' "$OUT/$1.txt" | tr '\n' ' ')"
}
for d in business bus harness; do node_suite $d packages/$d; done
for s in scripts/test-*.sh; do
b=$(basename "$s" .sh)
setsid -w timeout -k 10 1800 bash "$s" 2>&1 | tee "$OUT/$b.txt" >/dev/null
echo "$b: rc=${PIPESTATUS[0]} $(tail -2 "$OUT/$b.txt" | tr '\n' ' ' | cut -c1-160)"
done
echo done