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.
34 lines
2.1 KiB
Bash
Executable File
34 lines
2.1 KiB
Bash
Executable File
#!/bin/bash
|
||
set -o pipefail
|
||
# Darkwing builder gate, row 137 (#1631), candidate in the r137 worktree on
|
||
# base 7a2987cf5. Every package's node suite except queue's (test-queue.sh
|
||
# runs it), then every scripts/test-*.sh, sequential, each teed to its own
|
||
# log; stops at the first failure. cli's launcher test runs on its own under
|
||
# the session's inherited TMPDIR (the bwrap runner fails "did not start" under
|
||
# an override or with TMPDIR unset).
|
||
G=$HOME/darkwing-scratch/r137/wt
|
||
OUT=$HOME/darkwing-scratch/r137/gate${1:+-$1}
|
||
INHERITED_TMPDIR=${TMPDIR:?the session TMPDIR}
|
||
export TMPDIR=$HOME/darkwing-scratch/r137/tmp
|
||
export COMPOSE_PROJECT_NAME=darkwing-r137
|
||
dropnet() { n=${COMPOSE_PROJECT_NAME}_default
|
||
if docker network inspect "$n" >/dev/null 2>&1; then
|
||
c=$(docker network inspect -f '{{len .Containers}}' "$n"); [ "$c" = 0 ] && docker network rm "$n" >/dev/null && echo "network $n removed" || echo "network $n kept, $c containers"
|
||
fi; }
|
||
trap dropnet EXIT
|
||
mkdir -p "$OUT" "$TMPDIR"
|
||
cd "$G" || exit 9
|
||
[ -e "$G/node_modules" ] || { echo "STOP no node_modules in $G"; exit 8; }
|
||
echo "base $(git rev-parse --short HEAD) DOCKER_HOST=${DOCKER_HOST:-unset} docker=$(docker info --format '{{.ServerVersion}}' 2>/dev/null || echo none) start $(date -u +%H:%M:%S)"
|
||
run() { local name="$1" dir="$2" cmd="$3" t0; t0=$(date -u +%H:%M:%S)
|
||
(cd "$G/$dir" && bash -c "$cmd") 2>&1 | tee "$OUT/$name.log" > /dev/null; local rc=$?
|
||
echo "$name rc=$rc $t0-$(date -u +%H:%M:%S) $(grep -E '^ℹ (pass|fail|skipped) [0-9]+' "$OUT/$name.log" | tr '\n' ' ') | $(tail -n1 "$OUT/$name.log")"
|
||
[ $rc -eq 0 ] || { echo "STOP $name"; exit $rc; }; }
|
||
for d in packages/*/; do p=$(basename "$d"); [ -d "$d/tests" ] || continue; [ "$p" = queue ] && continue
|
||
if [ "$p" = cli ]; then
|
||
run pkg-cli packages/cli 'node --test $(ls tests/*.test.mjs | grep -v "^tests/launcher\.test\.mjs$")'
|
||
run pkg-cli-launcher packages/cli "TMPDIR=$INHERITED_TMPDIR node --test tests/launcher.test.mjs"
|
||
else run "pkg-$p" "packages/$p" 'node --test tests/*.test.mjs'; fi; done
|
||
for s in scripts/test-*.sh; do n=$(basename "$s" .sh); run "script-${n#test-}" . "bash $s"; done
|
||
echo "GATE_PASSED $(date -u +%H:%M:%S)"
|