diff --git a/src/cli/cli.c b/src/cli/cli.c index f88f765e1..05c9a560b 100644 --- a/src/cli/cli.c +++ b/src/cli/cli.c @@ -2934,7 +2934,11 @@ int cbm_cmd_uninstall(int argc, char **argv) { /* Step 3: Remove binary */ char bin_path[1024]; +#ifdef _WIN32 + snprintf(bin_path, sizeof(bin_path), "%s/.local/bin/codebase-memory-mcp.exe", home); +#else snprintf(bin_path, sizeof(bin_path), "%s/.local/bin/codebase-memory-mcp", home); +#endif struct stat st; if (stat(bin_path, &st) == 0) { if (!dry_run) { diff --git a/test-infrastructure/docker-compose.yml b/test-infrastructure/docker-compose.yml index cd2763240..7ab21cb49 100644 --- a/test-infrastructure/docker-compose.yml +++ b/test-infrastructure/docker-compose.yml @@ -99,6 +99,36 @@ services: scripts/build.sh CC=gcc CXX=g++ && scripts/smoke-test.sh ./build/c/codebase-memory-mcp + # ── Windows smoke (cross-compile + Wine) ────────────────── + smoke-windows: + build: + context: .. + dockerfile: test-infrastructure/Dockerfile.mingw + platform: linux/amd64 + volumes: + - ..:/src + entrypoint: ["/bin/bash", "-c"] + command: + - | + scripts/build.sh CC=x86_64-w64-mingw32-clang CXX=x86_64-w64-mingw32-clang++ && + mv build/c/codebase-memory-mcp build/c/codebase-memory-mcp.exe 2>/dev/null || true && + WINEDEBUG=-all scripts/smoke-test.sh ./build/c/codebase-memory-mcp.exe + + # ── Windows soak (cross-compile + Wine) ─────────────────── + soak-windows: + build: + context: .. + dockerfile: test-infrastructure/Dockerfile.mingw + platform: linux/amd64 + volumes: + - ..:/src + entrypoint: ["/bin/bash", "-c"] + command: + - | + scripts/build.sh CC=x86_64-w64-mingw32-clang CXX=x86_64-w64-mingw32-clang++ && + mv build/c/codebase-memory-mcp build/c/codebase-memory-mcp.exe 2>/dev/null || true && + CBM_DIAGNOSTICS=1 WINEDEBUG=-all scripts/soak-test.sh ./build/c/codebase-memory-mcp.exe 10 + # ── Lint ──────────────────────────────────────────────────── lint: build: diff --git a/test-infrastructure/run.sh b/test-infrastructure/run.sh index c07129ef2..2c8294c5e 100755 --- a/test-infrastructure/run.sh +++ b/test-infrastructure/run.sh @@ -45,8 +45,16 @@ case "${1:-full}" in $COMPOSE run --rm smoke ;; windows) - echo "=== Windows: cross-compile (mingw-w64) ===" - $COMPOSE run --rm build-windows + echo "=== Windows: cross-compile + smoke (Wine) ===" + $COMPOSE run --rm smoke-windows + ;; + smoke-windows) + echo "=== Windows: smoke test (cross-compile + Wine) ===" + $COMPOSE run --rm smoke-windows + ;; + soak-windows) + echo "=== Windows: soak test (cross-compile + Wine, 10 min) ===" + $COMPOSE run --rm soak-windows ;; amd64) echo "=== Linux amd64: test + build ===" @@ -62,8 +70,8 @@ case "${1:-full}" in $COMPOSE run --rm test-amd64 $COMPOSE run --rm build-amd64 $COMPOSE run --rm smoke-amd64 - echo "=== Windows: cross-compile ===" - $COMPOSE run --rm build-windows + echo "=== Windows: cross-compile + smoke (Wine) ===" + $COMPOSE run --rm smoke-windows echo "=== All platforms passed ===" ;; lint)