61241c3a82
- install.sh: install runtime tree under OPENCODE_DEV_AGENT_TEAM (bin/, 12 skills, improvements/, install-manifest.json), idempotent shell-rc export, --uninstall (preserves improvements/ user data) and --migrate; preserves 13-agent copy, .backup retention, KEEP_BACKUPS=5, count gate, cmp -s integrity, install-time permission gate - memory-lifecycle.sh: resolve MEMORY_DIR from project git root + OPENCODE_MEMORY_DIR - all 13 agents: canonical runtime sentence + env-resolved runtime paths; project-scoped refs unchanged - tests: new test-install (15), test-runtime (10), test-path-resolution (12), test-memory-isolation (12); TEAM_ROOT override on existing 4 suites; test-all.sh registers 8 suites (100 checks total)
64 lines
1.8 KiB
Bash
Executable File
64 lines
1.8 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# test-all.sh — Run every test suite in the repo and report a combined result.
|
|
#
|
|
# bash scripts/test-all.sh
|
|
#
|
|
# Exit code: 0 if all suites pass, non-zero if any suite fails.
|
|
# Optional: pass --verbose to show each suite's full output on failure.
|
|
|
|
set -uo pipefail
|
|
TEAM_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
VERBOSE=0
|
|
[ "${1:-}" = "--verbose" ] && VERBOSE=1
|
|
|
|
SUITES=(test-agent-architecture test-memory-system test-repo-bootstrap test-integration test-install test-runtime test-path-resolution test-memory-isolation)
|
|
|
|
BOLD=""
|
|
RESET=""
|
|
if [ -t 1 ]; then
|
|
BOLD="\033[1m"
|
|
RESET="\033[0m"
|
|
fi
|
|
|
|
pass=0; fail=0
|
|
printf "${BOLD}=== Agent Team: full test run ===${RESET}\n\n"
|
|
|
|
for s in "${SUITES[@]}"; do
|
|
script="$TEAM_ROOT/scripts/$s.sh"
|
|
if [ ! -f "$script" ]; then
|
|
printf " %-28s ${BOLD}MISSING${RESET}\n" "$s"
|
|
fail=$((fail + 1))
|
|
continue
|
|
fi
|
|
out="$(bash "$script" 2>&1)"
|
|
rc=$?
|
|
|
|
# Count individual PASS/FAIL lines (uniform format: "PASS T01 ..." / "PASS I01 ...";
|
|
# excludes the summary lines that also start with "PASS:"/"FAIL:").
|
|
npass="$(printf '%s\n' "$out" | grep -cE '^PASS [TI]' || true)"
|
|
nfail="$(printf '%s\n' "$out" | grep -cE '^FAIL [TI]' || true)"
|
|
|
|
if [ "$rc" = "0" ]; then
|
|
printf " %-28s ${BOLD}PASS${RESET} (%s checks)\n" "$s" "$npass"
|
|
pass=$((pass + 1))
|
|
else
|
|
printf " %-28s ${BOLD}FAIL${RESET} (%s check(s) failed)\n" "$s" "$nfail"
|
|
fail=$((fail + 1))
|
|
if [ "$VERBOSE" = "1" ]; then
|
|
printf '\n--- %s output ---\n%s\n--------------------------\n' "$s" "$out"
|
|
fi
|
|
fi
|
|
done
|
|
|
|
printf '\n%s=== RESULT ===%s\n' "$BOLD" "$RESET"
|
|
printf 'suites passed: %d suites failed: %d (total %d suites)\n' \
|
|
"$pass" "$fail" "${#SUITES[@]}"
|
|
|
|
if [ "$fail" = "0" ]; then
|
|
printf 'ALL SUITES PASS\n'
|
|
exit 0
|
|
else
|
|
printf 'FAILURES PRESENT\n'
|
|
exit 1
|
|
fi |