scheduler_test_src = [ 'test.c', ] scheduler_test_deps = [libxce_deps, librtti_dep, unity_dep, libxce_dep] incdir = include_directories('../include', '../../include', '.', '../src', '../../lib') scheduler_test = executable('sched_test', scheduler_test_src, include_directories:[incdir], dependencies: [scheduler_test_deps], install: false) # White-box test for the notify single-job in-place update path # (sched_update_existing_job). It #includes ../src/schedobj.c directly, so it # is a standalone TU with its own main() — built as a separate executable. sched_job_update_test = executable('sched_job_update_test', ['test_job_update.c'], include_directories:[incdir], dependencies: [scheduler_test_deps], install: false) # White-box test for the notify/dataset enqueue handlers. It #includes # ../src/handler.c directly (enq_pend_update + the static handlers), so it is a # standalone TU with its own main() — built as a separate executable. sched_handlers_test = executable('sched_handlers_test', ['test_handlers.c'], include_directories:[incdir], dependencies: [scheduler_test_deps], install: false) # White-box test for the compact job-array push receive/expand path # (job-array-single-wal-record task 5.3). It also #includes ../src/handler.c # directly, but additionally needs a REAL sched->jobs kvmgr (sched_get_job/ # sched_add_job) to exercise the per-element dedup check for real — kept as # its own binary rather than folded into sched_handlers_test so that file's # "self-contained, only sched_init_config stubbed" story stays accurate. sched_job_array_test = executable('sched_job_array_test', ['test_job_array_expand.c'], include_directories:[incdir], dependencies: [scheduler_test_deps], install: false) # Cross-daemon integration test (job-array-single-wal-record task 5.5): the # REAL xce_encode()/xce_decode()/extract_data() -> scheduler_req_handler() # chain (the top-level function vtask_entry() registers as its handler), # proving one-push/N-tasks/log-once and redelivery-safety under genuinely # re-decoded wire bytes -- one layer more real than sched_job_array_test's # own wire-dispatch case, which stops at sched_handle_dataset(). Kept as its # own binary for the same reason sched_job_array_test is separate from # sched_handlers_test: it needs a REAL sched->jobs kvmgr for the dedup check. sched_job_array_wire_e2e_test = executable('sched_job_array_wire_e2e_test', ['test_job_array_wire_e2e.c'], include_directories:[incdir], dependencies: [scheduler_test_deps], install: false) # White-box regression test for bug-1498 (scheduler re-dispatches a job it # already dispatched): sched_job_is_ready PEND-gating + dispatch-commit marks # the job RUN. It #includes ../src/scheduler.c directly, so it is a standalone # TU with its own main() — built as a separate executable. sched_redispatch_test = executable('sched_redispatch_test', ['test_redispatch.c'], include_directories:[incdir], dependencies: [scheduler_test_deps], install: false) # Register as meson tests so `meson test --suite scheduler` runs them all. # detect_leaks=0 matches the suite convention (fixtures are not torn down). test('scheduler test', scheduler_test, suite: 'scheduler', env: ['ASAN_OPTIONS=detect_leaks=0']) test('scheduler job-update test', sched_job_update_test, suite: 'scheduler', env: ['ASAN_OPTIONS=detect_leaks=0']) test('scheduler redispatch test', sched_redispatch_test, suite: 'scheduler', env: ['ASAN_OPTIONS=detect_leaks=0']) test('scheduler handlers test', sched_handlers_test, suite: 'scheduler', env: ['ASAN_OPTIONS=detect_leaks=0']) test('scheduler job-array expand test', sched_job_array_test, suite: 'scheduler', env: ['ASAN_OPTIONS=detect_leaks=0']) test('scheduler job-array wire e2e test', sched_job_array_wire_e2e_test, suite: 'scheduler', env: ['ASAN_OPTIONS=detect_leaks=0'])