22 lines
1.0 KiB
Bash
22 lines
1.0 KiB
Bash
#!/usr/bin/env bash
|
||
# Row 100 gate: every package's own test script, from its directory, then
|
||
# every scripts/test-*.sh, sequential, full output kept.
|
||
cd ~/darkwing-scratch/r100/wt || exit 2
|
||
W=$PWD
|
||
export TMPDIR=~/darkwing-scratch/r100/tmp
|
||
O=${GATE_OUT:-~/darkwing-scratch/r100/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
|