| 439 | static int g_parity_setup_done = 0; |
| 440 | |
| 441 | static int ensure_parity_setup(void) { |
| 442 | if (g_parity_setup_done) |
| 443 | return 0; |
| 444 | |
| 445 | if (setup_parallel_repo() != 0) |
| 446 | return -1; |
| 447 | |
| 448 | /* Discover files */ |
| 449 | cbm_discover_opts_t opts = {.mode = CBM_MODE_FULL}; |
| 450 | cbm_file_info_t *files = NULL; |
| 451 | int file_count = 0; |
| 452 | if (cbm_discover(g_par_tmpdir, &opts, &files, &file_count) != 0) |
| 453 | return -1; |
| 454 | |
| 455 | const char *project = "par-test"; |
| 456 | |
| 457 | /* Build structure for both (need File/Folder nodes before definitions) */ |
| 458 | /* For parity, we need the structure pass too. Let's just compare |
| 459 | * definition/call/usage/semantic edge counts. */ |
| 460 | |
| 461 | /* Run both modes */ |
| 462 | g_seq_gbuf = run_sequential(project, g_par_tmpdir, files, file_count); |
| 463 | g_par_gbuf = run_parallel(project, g_par_tmpdir, files, file_count, 2); |
| 464 | |
| 465 | cbm_discover_free(files, file_count); |
| 466 | g_parity_setup_done = 1; |
| 467 | return 0; |
| 468 | } |
| 469 | |
| 470 | static void parity_teardown(void) { |
| 471 | if (g_seq_gbuf) { |
no test coverage detected