test(scheduler): aggregate 28 white-box tests into one sched_unit_test
Collapse the 28 zero-#include white-box scheduler tests (whose meson executable blocks each duplicated the full scheduler_srcs list) into a single sched_unit_test aggregate, following the controller controller_test.c precedent: one executable, one process, one runner. - sched_unit_runner.c: SUITES registry (28 entries) with per-suite setUp/tearDown dispatch, -t <suite> filter, UnitySetTestFile per entry - testsuite/meson.build: runner + 28 test TUs + every scheduler_srcs entry except src/main.c as separate TUs; foreach over scheduler_srcs so the aggregate can never drift from the production source list; all baked-path defines (XCE_SCHED_*_PATH, XCE_SIM_*) move to the aggregate's c_args; -Werror=incompatible-pointer-types carried suite-wide (verified clean across all 28 tests + 50 src TUs) - transformed tests drop main()/setUp()/tearDown() and local stubs that now resolve against the aggregate's real src TUs - test() registrations 126 -> 99 (126 - 28 + 1 aggregate); the three --wrap= interposition tests (decision publish retry, backpressure, decision redelivery) keep their standalone executables unchanged - isolation libs (sched_core_isolation_lib, sched_sim_isolation_lib) stay build-only and are wired as test()-level depends; the nm(1) text-scan tests find them via XCE_CORE_LIB_PATH/XCE_SIM_LIB_PATH Verified: meson test --suite scheduler 100/100 green x3 consecutive runs (43s total, aggregate 3.3s); /tmp/xce_* sweep clean (the one leftover is test_worker_launch_type_dispatch.c's by-design fixed-path fake xrun launcher). Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
parent
d167923632
commit
a905baf013
30 changed files with 560 additions and 752 deletions
|
|
@ -133,9 +133,6 @@ static xce_job_alloc_t* make_dispatch_alloc(uint64_t jobid, char* host,
|
|||
return j;
|
||||
}
|
||||
|
||||
void setUp(void) { return; }
|
||||
void tearDown(void) { return; }
|
||||
|
||||
/*
|
||||
* Requirement 1.1: committing a DISPATCH decision transitions the job to
|
||||
* JOB_STAT_RUN in the SAME operation that commits job->allocs/job->accounts
|
||||
|
|
@ -436,13 +433,13 @@ static void test_dispatch_commit_multi_round_gap_matches_same_round_confirmation
|
|||
TEST_ASSERT_EQUAL_FLOAT(same_round_val, multi_round_gap_val);
|
||||
}
|
||||
|
||||
int main(void)
|
||||
/* ---- suite entry for the sched_unit_test aggregate ---------------------- */
|
||||
void test_sched_scheduler_dispatch_commit(void)
|
||||
{
|
||||
UNITY_BEGIN();
|
||||
UnitySetTestFile(__FILE__);
|
||||
RUN_TEST(test_dispatch_commit_transitions_job_to_run);
|
||||
RUN_TEST(test_dispatch_commit_survives_round_boundary_before_confirmation);
|
||||
RUN_TEST(test_dispatch_commit_survives_several_rounds_before_confirmation);
|
||||
RUN_TEST(test_dispatch_commit_multi_round_gap_matches_same_round_confirmation);
|
||||
RUN_TEST(test_pend_decision_does_not_touch_job_state);
|
||||
return UNITY_END();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue