#!/usr/bin/env bash # Row 109 (#1603): the gate suites, run in the given worktree with every output teed to . # Usage: suites.sh 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