Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.
C aiderastclaude-codecode-analysiscode-intelligencecodexcursorcypherdeveloper-toolsgemini-cligraph-visualizationkilocodeknowledge-graphmcpmcp-servermodel-context-protocolopencodesqlitetree-sitterwindsurf
test: use portable temp dir/paths so Windows unit tests pass
Martin Vogel7bf3aa86a0c5
diff --git a/tests/test_path_alias.c b/tests/test_path_alias.cindex 52ac576a8..84d6ce819 100644--- a/tests/test_path_alias.c+++ b/tests/test_path_alias.c@@ -230,7 +230,7 @@ static int write_file(const char *path, const char *content) {TEST(path_alias_loader_monorepo) {char tmpl[] = "/tmp/cbm_palias_XXXXXX";- char *root = mkdtemp(tmpl);+ char *root = cbm_mkdtemp(tmpl);ASSERT_NOT_NULL(root);char sub[512];@@ -292,7 +292,7 @@ TEST(path_alias_loader_monorepo) {TEST(path_alias_loader_no_configs) {char tmpl[] = "/tmp/cbm_palias_empty_XXXXXX";- char *root = mkdtemp(tmpl);+ char *root = cbm_mkdtemp(tmpl);ASSERT_NOT_NULL(root);cbm_path_alias_collection_t *coll = cbm_load_path_aliases(root);diff --git a/tests/test_store_checkpoint.c b/tests/test_store_checkpoint.cindex d3ed8d1c9..11542969c 100644--- a/tests/test_store_checkpoint.c+++ b/tests/test_store_checkpoint.c@@ -22,7 +22,7 @@TEST(checkpoint_does_not_truncate_wal) {enum { N_ROWS = 100, PATH_BUF = 256, PATH_BUF_EXT = 300 };char db_path[PATH_BUF];- snprintf(db_path, sizeof(db_path), "/tmp/cbm_test_ckpt_%d.db", (int)getpid());+ snprintf(db_path, sizeof(db_path), "%s/cbm_test_ckpt_%d.db", cbm_tmpdir(), (int)getpid());char wal_path[PATH_BUF_EXT];snprintf(wal_path, sizeof(wal_path), "%s-wal", db_path);char shm_path[PATH_BUF_EXT];diff --git a/tests/test_store_pragmas.c b/tests/test_store_pragmas.cindex fdc5377ce..23c15f936 100644--- a/tests/test_store_pragmas.c+++ b/tests/test_store_pragmas.c@@ -66,7 +66,7 @@ TEST(mmap_size_partial_garbage_falls_back_to_default) {TEST(store_open_with_mmap_disabled) {cbm_setenv("CBM_SQLITE_MMAP_SIZE", "0", 1);char tmp_path[256];- snprintf(tmp_path, sizeof(tmp_path), "/tmp/cbm_test_pragmas_%d.db", (int)getpid());+ snprintf(tmp_path, sizeof(tmp_path), "%s/cbm_test_pragmas_%d.db", cbm_tmpdir(), (int)getpid());unlink(tmp_path);cbm_store_t *s = cbm_store_open_path(tmp_path);