| 299 | } |
| 300 | |
| 301 | static void incremental_teardown(void) { |
| 302 | if (g_srv) { |
| 303 | cbm_mcp_server_free(g_srv); |
| 304 | g_srv = NULL; |
| 305 | } |
| 306 | if (g_project) { |
| 307 | unlink(g_dbpath); |
| 308 | char wal[520], shm[520]; |
| 309 | snprintf(wal, sizeof(wal), "%s-wal", g_dbpath); |
| 310 | snprintf(shm, sizeof(shm), "%s-shm", g_dbpath); |
| 311 | unlink(wal); |
| 312 | unlink(shm); |
| 313 | } |
| 314 | free(g_project); |
| 315 | g_project = NULL; |
| 316 | |
| 317 | th_rmtree(g_tmpdir); |
| 318 | } |
| 319 | |
| 320 | /* ══════════════════════════════════════════════════════════════════ |
| 321 | * PHASE 1: Full index — baseline + performance |
no test coverage detected