MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / prune_fixture_teardown

Function prune_fixture_teardown

tests/test_watcher.c:267–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267static void prune_fixture_teardown(prune_fixture_t *f) {
268 if (f->had_cache_dir) {
269 cbm_setenv("CBM_CACHE_DIR", f->saved_cache_dir, 1);
270 } else {
271 cbm_unsetenv("CBM_CACHE_DIR");
272 }
273 if (f->had_grace) {
274 cbm_setenv("CBM_WATCHER_PRUNE_GRACE_S", f->saved_grace, 1);
275 } else {
276 cbm_unsetenv("CBM_WATCHER_PRUNE_GRACE_S");
277 }
278 th_rmtree(f->rootdir);
279 th_rmtree(f->cachedir);
280}
281
282typedef struct {
283 const char *root_to_restore;

Callers 1

test_watcher.cFile · 0.85

Calls 3

cbm_setenvFunction · 0.85
cbm_unsetenvFunction · 0.85
th_rmtreeFunction · 0.85

Tested by

no test coverage detected