Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/fm-afk-pi-herdr-return-e2e.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1
# shellcheck source=/dev/null
. "$ROOT/bin/fm-supervise-daemon.sh"
# shellcheck source=/dev/null
Expand Down Expand Up @@ -56,7 +56,7 @@ cleanup() {
if ! "$LAB_HELPER" teardown "$SESSION"; then
rc=1
fi
rm -rf "$TMP_ROOT"
fm_test_rmtree "$TMP_ROOT"
exit "$rc"
}
trap cleanup EXIT
Expand Down
2 changes: 1 addition & 1 deletion tests/fm-afk-return.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

TMP_ROOT=$(fm_test_tmproot fm-afk-return-tests)

Expand Down
2 changes: 1 addition & 1 deletion tests/fm-arm-pretool-check.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

CHECK="$ROOT/bin/fm-arm-pretool-check.sh"
POLICY="$ROOT/bin/fm-arm-command-policy.mjs"
Expand Down
2 changes: 1 addition & 1 deletion tests/fm-ask-user-authority.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

BRIEF="$ROOT/bin/fm-brief.sh"
TMP_ROOT=$(fm_test_tmproot fm-ask-user-authority)
Expand Down
2 changes: 1 addition & 1 deletion tests/fm-backend-cmux.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

command -v jq >/dev/null 2>&1 || { echo "skip: jq not found (required by the cmux adapter)"; exit 0; }

Expand Down
4 changes: 2 additions & 2 deletions tests/fm-backend-herdr.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1
# shellcheck source=tests/herdr-test-safety.sh
. "$(dirname "${BASH_SOURCE[0]}")/herdr-test-safety.sh"
. "$(dirname "${BASH_SOURCE[0]}")/herdr-test-safety.sh" || exit 1

command -v jq >/dev/null 2>&1 || { echo "skip: jq not found (required by the herdr adapter)"; exit 0; }

Expand Down
2 changes: 1 addition & 1 deletion tests/fm-backend-orca.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

TMP_ROOT=$(fm_test_tmproot fm-backend-orca-tests)

Expand Down
2 changes: 1 addition & 1 deletion tests/fm-backend-zellij.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

command -v jq >/dev/null 2>&1 || { echo "skip: jq not found (required by the zellij adapter)"; exit 0; }

Expand Down
2 changes: 1 addition & 1 deletion tests/fm-backend.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1
fm_git_identity fmtest fmtest@example.invalid

# shellcheck source=/dev/null
Expand Down
2 changes: 1 addition & 1 deletion tests/fm-backlog-handoff.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
set -u

# shellcheck source=tests/secondmate-helpers.sh disable=SC1091
. "$(dirname "${BASH_SOURCE[0]}")/secondmate-helpers.sh"
. "$(dirname "${BASH_SOURCE[0]}")/secondmate-helpers.sh" || exit 1

# The move is delegated to `tasks-axi mv`, so this suite exercises the real
# binary. Skip cleanly when it is absent (matching the backend smoke suites).
Expand Down
2 changes: 1 addition & 1 deletion tests/fm-bearings-snapshot.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -u

# shellcheck source=tests/lib.sh
# shellcheck disable=SC1091
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

BEARINGS="$ROOT/bin/fm-bearings-snapshot.sh"
TMP_ROOT=$(fm_test_tmproot fm-bearings)
Expand Down
2 changes: 1 addition & 1 deletion tests/fm-bootstrap.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
set -u

# shellcheck source=tests/lib.sh disable=SC1091
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

BASE_PATH=${FM_TEST_BASE_PATH:-/usr/bin:/bin:/usr/sbin:/sbin}
TMP_ROOT=$(fm_test_tmproot fm-bootstrap-tests)
Expand Down
2 changes: 1 addition & 1 deletion tests/fm-brief.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

TMP_ROOT=$(fm_test_tmproot fm-brief)
BRIEF_HOME="$TMP_ROOT/home"
Expand Down
2 changes: 1 addition & 1 deletion tests/fm-busy-adapter-wiring.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

# shellcheck source=/dev/null
. "$ROOT/bin/fm-busy-lib.sh"
Expand Down
2 changes: 1 addition & 1 deletion tests/fm-busy-state.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

# shellcheck source=/dev/null
. "$ROOT/bin/fm-busy-lib.sh"
Expand Down
2 changes: 1 addition & 1 deletion tests/fm-calm-pi-extension.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

TMP_ROOT=$(fm_test_tmproot fm-calm-pi-extension)
EXT="$ROOT/.pi/extensions/fm-calm.ts"
Expand Down
2 changes: 1 addition & 1 deletion tests/fm-cd-pretool-check.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

fm_git_identity fmtest fmtest@example.invalid
TMP_ROOT=$(fm_test_tmproot fm-cd-pretool-check)
Expand Down
2 changes: 1 addition & 1 deletion tests/fm-ci-probe.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

PROBE="$ROOT/bin/fm-ci-probe.sh"
TMP_ROOT=$(fm_test_tmproot fm-ci-probe)
Expand Down
2 changes: 1 addition & 1 deletion tests/fm-classify-decision-key.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

# shellcheck source=bin/fm-classify-lib.sh
. "$ROOT/bin/fm-classify-lib.sh"
Expand Down
2 changes: 1 addition & 1 deletion tests/fm-claude-stop-autoarm.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

TMP_ROOT=$(fm_test_tmproot fm-claude-stop-autoarm)
fm_git_identity fmtest fmtest@example.invalid
Expand Down
2 changes: 1 addition & 1 deletion tests/fm-composer-ghost.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

LIB="$ROOT/bin/fm-tmux-lib.sh"
PEEK="$ROOT/bin/fm-peek.sh"
Expand Down
2 changes: 1 addition & 1 deletion tests/fm-composer-lib.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

# shellcheck source=/dev/null
. "$ROOT/bin/fm-composer-lib.sh"
Expand Down
7 changes: 5 additions & 2 deletions tests/fm-control-herdr-smoke.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ cleanup_all() {
trap cleanup_all EXIT
fm_herdr_lab_prepare "$SESSION" || fail "could not prepare isolated Herdr lab session"

SCRATCH=$(mktemp -d "${TMPDIR:-/tmp}/fm-control-herdr.XXXXXX")
SCRATCH=$(cd "$SCRATCH" && pwd)
# Checked, because the next line resolves SCRATCH through `cd`, and `cd ""`
# succeeds as a no-op: an unchecked mktemp failure would turn SCRATCH into the
# working directory and hand it to cleanup_all's rm.
SCRATCH=$(mktemp -d "${TMPDIR:-/tmp}/fm-control-herdr.XXXXXX") || fail "could not create the scratch fixture root"
SCRATCH=$(cd "$SCRATCH" && pwd) || fail "could not resolve the scratch fixture root"
HOME_DIR="$SCRATCH/home"
mkdir -p "$HOME_DIR/state" "$HOME_DIR/data/hsmoke"
printf '# brief\n' > "$HOME_DIR/data/hsmoke/brief.md"
Expand Down
4 changes: 2 additions & 2 deletions tests/fm-control-relaunch.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1
# shellcheck source=/dev/null
. "$ROOT/bin/fm-control-lib.sh"
# shellcheck source=/dev/null
Expand All @@ -42,7 +42,7 @@ relaunch_cleanup() {
for d in "${TASK_TMPS[@]:-}"; do
[ -n "$d" ] && rm -rf "$d"
done
rm -rf "$TMP_ROOT"
fm_test_rmtree "$TMP_ROOT"
}
trap relaunch_cleanup EXIT

Expand Down
4 changes: 2 additions & 2 deletions tests/fm-control.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1
# shellcheck source=/dev/null
. "$ROOT/bin/fm-control-lib.sh"
# shellcheck source=/dev/null
Expand All @@ -33,7 +33,7 @@ SEND="$ROOT/bin/fm-send.sh"
TMP_ROOT=$(fm_test_tmproot fm-control)
mkdir -p "$TMP_ROOT"
TMP_ROOT=$(cd "$TMP_ROOT" && pwd)
trap 'rm -rf "$TMP_ROOT"' EXIT
trap 'fm_test_rmtree "$TMP_ROOT"' EXIT

VERIFIED_HARNESSES="claude codex opencode pi pi-signed grok kimi cursor muse"

Expand Down
2 changes: 1 addition & 1 deletion tests/fm-crew-state.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1
# shellcheck source=/dev/null
. "$ROOT/bin/fm-classify-lib.sh"

Expand Down
4 changes: 2 additions & 2 deletions tests/fm-cursor-harness.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

# shellcheck source=bin/fm-cursor-lib.sh
. "$ROOT/bin/fm-cursor-lib.sh"
Expand All @@ -32,7 +32,7 @@ set -u

HARNESS="$ROOT/bin/fm-harness.sh"
TMP_ROOT=$(fm_test_tmproot fm-cursor-harness)
trap 'rm -rf "$TMP_ROOT"' EXIT
trap 'fm_test_rmtree "$TMP_ROOT"' EXIT

# A fake cursor install tree with BOTH installed names, shaped exactly like the
# real one: ~/.local/share/cursor-agent/versions/<version>/cursor-agent with
Expand Down
2 changes: 1 addition & 1 deletion tests/fm-cursor-primary-live-e2e.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if [ "${FM_CURSOR_PRIMARY_LIVE_E2E:-0}" != 1 ]; then
fi

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

CURSOR_BIN=${FM_CURSOR_BIN:-$(command -v cursor-agent || true)}
[ -n "$CURSOR_BIN" ] && [ -x "$CURSOR_BIN" ] \
Expand Down
2 changes: 1 addition & 1 deletion tests/fm-cursor-primary.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

TMP_ROOT=$(fm_test_tmproot fm-cursor-primary)
fm_git_identity fmtest fmtest@example.invalid
Expand Down
2 changes: 1 addition & 1 deletion tests/fm-daemon.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
set -u

# shellcheck source=tests/wake-helpers.sh
. "$(dirname "${BASH_SOURCE[0]}")/wake-helpers.sh"
. "$(dirname "${BASH_SOURCE[0]}")/wake-helpers.sh" || exit 1

DAEMON="$ROOT/bin/fm-supervise-daemon.sh"
AFK_START="$ROOT/bin/fm-afk-start.sh"
Expand Down
2 changes: 1 addition & 1 deletion tests/fm-decision-hold-lifecycle.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -u

# shellcheck source=tests/lib.sh
# shellcheck disable=SC1091
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

TEARDOWN="$ROOT/bin/fm-teardown.sh"
BEARINGS="$ROOT/bin/fm-bearings-snapshot.sh"
Expand Down
4 changes: 2 additions & 2 deletions tests/fm-documentation-audiences.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

CHECK="$ROOT/bin/fm-doc-audience-check.sh"
INVENTORY="$ROOT/docs/documentation-audiences.json"
TMP_ROOT=$(mktemp -d "${TMPDIR:-/tmp}/fm-doc-audiences.XXXXXX")
trap 'rm -rf "$TMP_ROOT"' EXIT
trap 'fm_test_rmtree "$TMP_ROOT"' EXIT

run_expect_failure() {
local expected=$1
Expand Down
2 changes: 1 addition & 1 deletion tests/fm-ensure-agents-md.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

TMP_ROOT=$(fm_test_tmproot fm-ensure-agents-md)

Expand Down
2 changes: 1 addition & 1 deletion tests/fm-fleet-snapshot-view.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -u

# shellcheck source=tests/lib.sh
# shellcheck disable=SC1091
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

SNAPSHOT="$ROOT/bin/fm-fleet-snapshot.sh"
VIEW="$ROOT/bin/fm-fleet-view.sh"
Expand Down
2 changes: 1 addition & 1 deletion tests/fm-fleet-sync.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

fm_git_identity fmtest fmtest@example.invalid

Expand Down
2 changes: 1 addition & 1 deletion tests/fm-gate-refuse.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

GATE_LIB="$ROOT/bin/fm-gate-refuse-lib.sh"
SPAWN="$ROOT/bin/fm-spawn.sh"
Expand Down
2 changes: 1 addition & 1 deletion tests/fm-grok-harness.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -u

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

SPAWN="$ROOT/bin/fm-spawn.sh"
TEARDOWN="$ROOT/bin/fm-teardown.sh"
Expand Down
2 changes: 1 addition & 1 deletion tests/fm-grok-stop-live-e2e.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [ "${FM_GROK_STOP_LIVE_E2E:-0}" != 1 ]; then
fi

# shellcheck source=tests/lib.sh
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" || exit 1

NATIVE_BIN=${FM_GROK_NATIVE_BIN:-}
LEGACY_BIN=${FM_GROK_LEGACY_BIN:-}
Expand Down
Loading
Loading