| 535 | return ok; |
| 536 | } |
| 537 | static bool pf_builtin_control(pf_fixture_t *f) { |
| 538 | static const char source[] = "void builtin_sink(void) {}\nTEST(alpha) { builtin_sink(); " |
| 539 | "}\nSUITE(core) { builtin_sink(); }\n"; |
| 540 | static const char config[] = "{\"test_impact\":{\"version\":1,\"tests\":{" |
| 541 | "\"presets\":{\"c-cbm\":true}}}}"; |
| 542 | if (!pf_source_write(f, "builtin.c", source)) |
| 543 | return false; |
| 544 | cbm_pipeline_frozen_t *owner = NULL; |
| 545 | bool ok = pf_create(f, config, NULL, &owner) == CBM_PIPELINE_FROZEN_OK && owner && |
| 546 | cbm_pipeline_frozen_build(owner) == CBM_PIPELINE_FROZEN_OK && |
| 547 | pf_builtin_graph(f->db) && pf_ordinary_graph(f->db) && |
| 548 | pf_files_equal(f->control, f->saved); |
| 549 | cbm_pipeline_frozen_free(owner); |
| 550 | return ok; |
| 551 | } |
| 552 | static cbm_pipeline_frozen_status_t pf_build_expected_ok(cbm_pipeline_frozen_t *owner) { |
| 553 | cbm_pipeline_frozen_status_t status = cbm_pipeline_frozen_build(owner); |
| 554 | if (status != CBM_PIPELINE_FROZEN_OK) { |
no test coverage detected