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

Function cpp_recv_open

tests/test_pipeline.c:23228–23252  ·  view source on GitHub ↗

Index the fixture; false (after cleanup) when the run itself fails. */

Source from the content-addressed store, hash-verified

23226
23227/* Index the fixture; false (after cleanup) when the run itself fails. */
23228static bool cpp_recv_open(CppRecvRun *r, bool parallel) {
23229 memset(r, 0, sizeof(*r));
23230 snprintf(r->tmp, sizeof(r->tmp), "/tmp/cbm_cpp_recv_XXXXXX");
23231 if (!cbm_mkdtemp(r->tmp)) {
23232 r->tmp[0] = '\0';
23233 return false;
23234 }
23235 cpp_recv_write_fixture(r->tmp, parallel);
23236 const char *old_workers = getenv("CBM_WORKERS");
23237 r->saved_workers = old_workers ? strdup(old_workers) : NULL;
23238 cbm_setenv("CBM_WORKERS", parallel ? "4" : "1", 1);
23239 snprintf(r->db, sizeof(r->db), "%s/cpp_recv.db", r->tmp);
23240 r->p = cbm_pipeline_new(r->tmp, r->db, CBM_MODE_FULL);
23241 if (!r->p || cbm_pipeline_run(r->p) != 0) {
23242 cpp_recv_close(r);
23243 return false;
23244 }
23245 r->s = cbm_store_open_path(r->db);
23246 r->project = cbm_pipeline_project_name(r->p);
23247 if (!r->s || !r->project || !cpp_recv_fixture_indexed(r)) {
23248 cpp_recv_close(r);
23249 return false;
23250 }
23251 return true;
23252}
23253
23254/* Properties of the CALLS edge caller -> target (QNs below the project), or
23255 * NULL when there is no such edge. The caller frees the result. */

Callers 1

test_pipeline.cFile · 0.85

Calls 9

cbm_mkdtempFunction · 0.85
cpp_recv_write_fixtureFunction · 0.85
cbm_setenvFunction · 0.85
cbm_pipeline_newFunction · 0.85
cbm_pipeline_runFunction · 0.85
cpp_recv_closeFunction · 0.85
cbm_store_open_pathFunction · 0.85
cpp_recv_fixture_indexedFunction · 0.85

Tested by

no test coverage detected