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

Function pc_run

tests/test_pipeline_conventions.c:248–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246 strcmp(now, before->generation) == 0;
247}
248static int pc_run(pc_fixture_t *f, cbm_index_mode_t mode, bool legacy, unsigned faults,
249 void (*hook)(cbm_pipeline_t *, const char *, void *), void *ctx,
250 cbm_incremental_route_t *route) {
251 cbm_pipeline_incremental_test_reset_faults();
252 if (getenv("CBM_INDEX_SINGLE_THREAD") == NULL && !pc_parallel_inputs(f, mode)) return -997;
253 cbm_pipeline_t *p = cbm_pipeline_new(f->repo, f->db, mode);
254 if (!p) return -999;
255 bool named = cbm_pipeline_set_project_name(p, PC_PROJECT);
256 cbm_pipeline_set_persistence(p, false);
257 if (hook) cbm_pipeline_set_before_publish_hook_for_tests(p, hook, ctx);
258 cbm_pipeline_test_set_fault_mask(p, faults);
259 if (legacy) cbm_pipeline_incremental_test_force_legacy_partial_once();
260 int rc = named ? cbm_pipeline_run(p) : -998;
261 if (route) *route = cbm_pipeline_incremental_test_last_route();
262 cbm_pipeline_free(p);
263 cbm_pipeline_incremental_test_reset_faults();
264 return rc;
265}
266static bool pc_seed(pc_fixture_t *f, const char *config) {
267 return pc_source_write(f, "unit.c", pc_legacy_source) &&
268 (!config || pc_write(f->config, config)) && pc_run(f, CBM_MODE_FULL, false, 0, NULL, NULL, NULL) == 0 &&

Callers 4

pc_seedFunction · 0.85
pc_configured_caseFunction · 0.85
pc_typed_degradeFunction · 0.85

Tested by

no test coverage detected