fix(tests): make runner worktree exclusions relative to the search root
Both runners excluded */.claude/worktrees/* by absolute path, which filtered out every test when the repo itself is a Claude worktree. Search from inside the root so only nested worktrees are skipped. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -151,11 +151,17 @@ run_bats
|
||||
# such file exists today -- the skill suites are all .bats, where run-bats.sh
|
||||
# already hit this -- so the exclusion is symmetry with its sibling, kept here
|
||||
# so the first shell suite added under a skill does not reintroduce it.
|
||||
#
|
||||
# The walk runs from inside SEARCH_ROOT so the exclusions match paths RELATIVE to
|
||||
# it. Matched against absolute paths, `*/.claude/worktrees/*` excluded every
|
||||
# suite whenever the checkout itself was a Claude worktree
|
||||
# (<repo>/.claude/worktrees/<name>/); relative, it still skips worktrees nested
|
||||
# below the root. The `./` prefix is swapped back for SEARCH_ROOT afterwards.
|
||||
SCRIPTS=()
|
||||
while IFS= read -r script; do
|
||||
SCRIPTS+=("$script")
|
||||
SCRIPTS+=("$SEARCH_ROOT/${script#./}")
|
||||
done < <(
|
||||
find "$SEARCH_ROOT" -name "test-*.sh" \
|
||||
cd "$SEARCH_ROOT" && find . -name "test-*.sh" \
|
||||
-not -path "*/.git/*" \
|
||||
-not -path "*/.claude/worktrees/*" \
|
||||
-not -path "*/apm_modules/*" \
|
||||
|
||||
Reference in New Issue
Block a user