Files
stack/agents/researcher/work/queue-109/suites.sh
T

22 lines
1.2 KiB
Bash
Executable File
Raw 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 109 (#1603): the gate suites, run in the given worktree with every output teed to <outdir>.
# Usage: suites.sh <worktree> <outdir>
set -u -o pipefail
WT=$(cd "$1" && pwd); OUT=$(mkdir -p "$2" && cd "$2" && pwd)
cd "$WT" || exit 2
node_suite() { # name dir
setsid -w timeout -k 10 900 node --test "$2"/tests/*.test.mjs 2>&1 | tee "$OUT/$1-node-suite.out" >/dev/null
echo "$1 node suite: rc=${PIPESTATUS[0]} $(grep -E '^ℹ (tests|pass|fail) ' "$OUT/$1-node-suite.out" | tr '\n' ' ')"
}
script() { # name
setsid -w timeout -k 10 1200 bash "scripts/$1.sh" 2>&1 | tee "$OUT/$1.out" >/dev/null
echo "$1: rc=${PIPESTATUS[0]} $(grep -iE 'passed|failed' "$OUT/$1.out" | tail -1)"
}
# Round 3: every package node suite, not only bus and harness.
for d in bus business cli control-board conversation discord harness ledger mosaic queue runs seat tasks webui; do
ls "packages/$d"/tests/*.test.mjs >/dev/null 2>&1 || { echo "$d: no tests/*.test.mjs"; continue; }
node_suite $d packages/$d
done
for s in test-auth test-conductor test-config test-discord test-extension-package test-foundation test-queue test-release test-task; do script $s; done
echo done