Files
stack/agents/darkwing/work/queue-103/gate.sh
T

22 lines
1.0 KiB
Bash
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 103 gate: every package's own test script, from its directory, then
# every scripts/test-*.sh, sequential, full output kept.
cd ~/darkwing-scratch/r103/wt || exit 2
W=$PWD
export TMPDIR=~/darkwing-scratch/r103/tmp
O=${GATE_OUT:-~/darkwing-scratch/r103/gate}
mkdir -p "$TMPDIR" "$O"
for d in packages/*/; do
p=$(basename "$d")
t=$(node -e 'const s=require(process.argv[1]).scripts?.test; if (s) console.log(s)' "$W/$d/package.json")
[ -n "$t" ] || { echo "$p: no test script"; continue; }
s=$(date -u +%T)
(cd "$W/$d" && bash -c "$t") > $O/node-$p.txt 2>&1; rc=$?
echo "$p rc=$rc $s-$(date -u +%T) $(grep -E '^ℹ (pass|fail|skipped)' $O/node-$p.txt | tr '\n' ' ') $(grep -cE '^✖|^not ok' $O/node-$p.txt) marks"
done
for f in scripts/test-*.sh; do
n=$(basename $f .sh); s=$(date -u +%T)
if [ $n = test-task ]; then DOCKER_HOST=unix:///nonexistent bash $f > $O/$n.txt 2>&1; else bash $f > $O/$n.txt 2>&1; fi; rc=$?
echo "$n rc=$rc $s-$(date -u +%T) $(tail -1 $O/$n.txt | cut -c1-120)"
done