Skip to content

Commit 9b9b6ff

Browse files
authored
Merge pull request DeusData#1463 from DeusData/fix/test-binary-builddir
fix(tests): resolve the prod binary from CBM_TEST_BINARY, not a hardcoded build/c
2 parents eb3e571 + ff4cc17 commit 9b9b6ff

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

‎scripts/test.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ CBM_TEST_BINARY="$WATCHDOG_BINARY" bash "$ROOT/tests/test_worker_watchdog.sh"
280280
# still exits nonzero for the user-facing tool error, but the supervisor must
281281
# preserve that response instead of misreporting exit_nonzero as a file crash.
282282
echo "=== Step 5c: worker error-response transport regression ==="
283-
bash "$ROOT/tests/test_worker_error_response.sh"
283+
CBM_TEST_BINARY="$WATCHDOG_BINARY" bash "$ROOT/tests/test_worker_error_response.sh"
284284

285285
# Step 5d (#1388) is DELIBERATELY NOT GATING HERE — see
286286
# tests/test_hook_conflict_notice.sh for the full what-was-tried record.

‎tests/test_hook_conflict_notice.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
set -euo pipefail
2525

2626
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
27-
BINARY="${ROOT}/build/c/codebase-memory-mcp"
27+
BINARY="${CBM_TEST_BINARY:-${ROOT}/build/c/codebase-memory-mcp}"
2828
if [[ ! -x "${BINARY}" && -x "${BINARY}.exe" ]]; then
2929
BINARY="${BINARY}.exe"
3030
fi

‎tests/test_worker_error_response.sh‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
set -euo pipefail
77

88
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
9-
BINARY="${ROOT}/build/c/codebase-memory-mcp"
9+
# scripts/test.sh builds into $BUILD_DIR, which is NOT build/c on every leg (the
10+
# Linux containers use build/linux-arm64 / build/linux-amd64). Honour the binary
11+
# the caller built, exactly as test_parent_watchdog.sh and test_worker_watchdog.sh
12+
# do; the build/c default keeps a bare manual invocation working.
13+
BINARY="${CBM_TEST_BINARY:-${ROOT}/build/c/codebase-memory-mcp}"
1014
if [[ ! -x "${BINARY}" && -x "${BINARY}.exe" ]]; then
1115
BINARY="${BINARY}.exe"
1216
fi

0 commit comments

Comments
 (0)