Fresh full reference build of the same tree into its own DB. */
| 2341 | |
| 2342 | /* Fresh full reference build of the same tree into its own DB. */ |
| 2343 | static void closure_fresh_full(const char *tmp, const char *db_path, int *out_nodes, |
| 2344 | int *out_edges, int *out_ref_edges, const char *project_hint) { |
| 2345 | *out_nodes = -1; |
| 2346 | *out_edges = -2; |
| 2347 | *out_ref_edges = -3; |
| 2348 | cbm_unlink(db_path); |
| 2349 | cbm_remove_db_sidecars(db_path); |
| 2350 | cbm_pipeline_t *full = cbm_pipeline_new(tmp, db_path, CBM_MODE_FULL); |
| 2351 | if (!full) { |
| 2352 | return; |
| 2353 | } |
| 2354 | int rc = cbm_pipeline_run(full); |
| 2355 | const char *project = cbm_pipeline_project_name(full); |
| 2356 | if (rc == 0) { |
| 2357 | cbm_store_t *store = cbm_store_open_path(db_path); |
| 2358 | if (store) { |
| 2359 | *out_nodes = cbm_store_count_nodes(store, project); |
| 2360 | *out_edges = cbm_store_count_edges(store, project); |
| 2361 | *out_ref_edges = named_edge_to_file_count(store, project, "CALL_REFERENCE", |
| 2362 | "closureProbeCaller", "closureProbeHelper", |
| 2363 | "lib.ts"); |
| 2364 | cbm_store_close(store); |
| 2365 | } |
| 2366 | } |
| 2367 | (void)project_hint; |
| 2368 | cbm_pipeline_free(full); |
| 2369 | } |
| 2370 | |
| 2371 | /* The manifest hash fans out across workers above a file-count threshold; |
| 2372 | * below it the serial path runs. Byte-identity of the parallel build is |
no test coverage detected