#!/bin/bash # Row 88 phase B: every packages/*/tests suite, then every scripts/test-*.sh, in order. # Stops at the first nonzero exit (set -e). Each step's output goes to r1/out/. # Usage: bash phase-b.sh set -e W="$1" OUT="$W/agents/researcher/work/queue-88/r1/out" export DOCKER_HOST=unix:///nonexistent.sock mkdir -p "$OUT" # Packages whose package.json script globs tests/*.test.mjs; the rest use tests/ as given. GLOB_PKGS=" bus cli harness tasks " for p in bus business cli control-board conversation discord harness ledger mosaic queue runs seat tasks webui; do cd "$W/packages/$p" if [[ "$GLOB_PKGS" == *" $p "* ]]; then node --test tests/*.test.mjs > "$OUT/pkg-$p.log" 2>&1 else node --test tests/ > "$OUT/pkg-$p.log" 2>&1 fi echo "pkg-$p exit=0 $(grep -E '^# (tests|pass|fail) ' "$OUT/pkg-$p.log" | tr '\n' ' ')" done cd "$W" for s in auth conductor config discord extension-package foundation queue release task; do scripts/test-"$s".sh > "$OUT/script-$s.log" 2>&1 echo "script-$s exit=0" done echo "PHASE_B_SUITES_PASSED"