Fresh full reference build of the same tree into its own DB. */
| 4611 | |
| 4612 | /* Fresh full reference build of the same tree into its own DB. */ |
| 4613 | static void closure_fresh_full(const char *tmp, const char *db_path, int *out_nodes, int *out_edges, |
| 4614 | int *out_ref_edges, const char *project_hint) { |
| 4615 | *out_nodes = -1; |
| 4616 | *out_edges = -2; |
| 4617 | *out_ref_edges = -3; |
| 4618 | cbm_unlink(db_path); |
| 4619 | cbm_remove_db_sidecars(db_path); |
| 4620 | cbm_pipeline_t *full = cbm_pipeline_new(tmp, db_path, CBM_MODE_FULL); |
| 4621 | if (!full) { |
| 4622 | return; |
| 4623 | } |
| 4624 | int rc = cbm_pipeline_run(full); |
| 4625 | const char *project = cbm_pipeline_project_name(full); |
| 4626 | if (rc == 0) { |
| 4627 | cbm_store_t *store = cbm_store_open_path(db_path); |
| 4628 | if (store) { |
| 4629 | *out_nodes = cbm_store_count_nodes(store, project); |
| 4630 | *out_edges = cbm_store_count_edges(store, project); |
| 4631 | *out_ref_edges = |
| 4632 | named_edge_to_file_count(store, project, "CALL_REFERENCE", "closureProbeCaller", |
| 4633 | "closureProbeHelper", "lib.ts"); |
| 4634 | cbm_store_close(store); |
| 4635 | } |
| 4636 | } |
| 4637 | (void)project_hint; |
| 4638 | cbm_pipeline_free(full); |
| 4639 | } |
| 4640 | |
| 4641 | /* The manifest hash fans out across workers above a file-count threshold; |
| 4642 | * below it the serial path runs. Byte-identity of the parallel build is |
no test coverage detected