Skip to content

Commit 988d975

Browse files
committed
Fix uninstall .exe path on Windows + add Windows smoke/soak to local test infra
1 parent 5ca369f commit 988d975

File tree

3 files changed

+46
-4
lines changed

3 files changed

+46
-4
lines changed

src/cli/cli.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2934,7 +2934,11 @@ int cbm_cmd_uninstall(int argc, char **argv) {
29342934

29352935
/* Step 3: Remove binary */
29362936
char bin_path[1024];
2937+
#ifdef _WIN32
2938+
snprintf(bin_path, sizeof(bin_path), "%s/.local/bin/codebase-memory-mcp.exe", home);
2939+
#else
29372940
snprintf(bin_path, sizeof(bin_path), "%s/.local/bin/codebase-memory-mcp", home);
2941+
#endif
29382942
struct stat st;
29392943
if (stat(bin_path, &st) == 0) {
29402944
if (!dry_run) {

test-infrastructure/docker-compose.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,36 @@ services:
9999
scripts/build.sh CC=gcc CXX=g++ &&
100100
scripts/smoke-test.sh ./build/c/codebase-memory-mcp
101101
102+
# ── Windows smoke (cross-compile + Wine) ──────────────────
103+
smoke-windows:
104+
build:
105+
context: ..
106+
dockerfile: test-infrastructure/Dockerfile.mingw
107+
platform: linux/amd64
108+
volumes:
109+
- ..:/src
110+
entrypoint: ["/bin/bash", "-c"]
111+
command:
112+
- |
113+
scripts/build.sh CC=x86_64-w64-mingw32-clang CXX=x86_64-w64-mingw32-clang++ &&
114+
mv build/c/codebase-memory-mcp build/c/codebase-memory-mcp.exe 2>/dev/null || true &&
115+
WINEDEBUG=-all scripts/smoke-test.sh ./build/c/codebase-memory-mcp.exe
116+
117+
# ── Windows soak (cross-compile + Wine) ───────────────────
118+
soak-windows:
119+
build:
120+
context: ..
121+
dockerfile: test-infrastructure/Dockerfile.mingw
122+
platform: linux/amd64
123+
volumes:
124+
- ..:/src
125+
entrypoint: ["/bin/bash", "-c"]
126+
command:
127+
- |
128+
scripts/build.sh CC=x86_64-w64-mingw32-clang CXX=x86_64-w64-mingw32-clang++ &&
129+
mv build/c/codebase-memory-mcp build/c/codebase-memory-mcp.exe 2>/dev/null || true &&
130+
CBM_DIAGNOSTICS=1 WINEDEBUG=-all scripts/soak-test.sh ./build/c/codebase-memory-mcp.exe 10
131+
102132
# ── Lint ────────────────────────────────────────────────────
103133
lint:
104134
build:

test-infrastructure/run.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,16 @@ case "${1:-full}" in
4545
$COMPOSE run --rm smoke
4646
;;
4747
windows)
48-
echo "=== Windows: cross-compile (mingw-w64) ==="
49-
$COMPOSE run --rm build-windows
48+
echo "=== Windows: cross-compile + smoke (Wine) ==="
49+
$COMPOSE run --rm smoke-windows
50+
;;
51+
smoke-windows)
52+
echo "=== Windows: smoke test (cross-compile + Wine) ==="
53+
$COMPOSE run --rm smoke-windows
54+
;;
55+
soak-windows)
56+
echo "=== Windows: soak test (cross-compile + Wine, 10 min) ==="
57+
$COMPOSE run --rm soak-windows
5058
;;
5159
amd64)
5260
echo "=== Linux amd64: test + build ==="
@@ -62,8 +70,8 @@ case "${1:-full}" in
6270
$COMPOSE run --rm test-amd64
6371
$COMPOSE run --rm build-amd64
6472
$COMPOSE run --rm smoke-amd64
65-
echo "=== Windows: cross-compile ==="
66-
$COMPOSE run --rm build-windows
73+
echo "=== Windows: cross-compile + smoke (Wine) ==="
74+
$COMPOSE run --rm smoke-windows
6775
echo "=== All platforms passed ==="
6876
;;
6977
lint)

0 commit comments

Comments
 (0)