Three-layer regression guard (test_sim_isolation.c) proving sim.h/sim.c/ sim_loop.c hold no controller-facing client/cluster-config/capnp-socket state: source-text scan, struct-body field scan, and nm(1) link-time undefined-symbol audit of a new isolated sched_sim_isolation_lib target.
81 lines
2.7 KiB
Meson
81 lines
2.7 KiB
Meson
scheduler_srcs = [
|
|
'src/main.c',
|
|
'src/handler.c',
|
|
'src/scheduler.c',
|
|
'src/core.c',
|
|
'src/core_events.c',
|
|
'src/core_session.c',
|
|
'src/core_clock.c',
|
|
'src/driver.c',
|
|
'src/snapshot.c',
|
|
'src/snapshot_wire.c',
|
|
'src/snapshot_load.c',
|
|
'src/decision.c',
|
|
'src/recording.c',
|
|
'src/recording_events.c',
|
|
'src/recording_session.c',
|
|
'src/sim.c',
|
|
'src/sim_loop.c',
|
|
'src/schedobj.c',
|
|
'src/plugin.c',
|
|
'src/resource.c',
|
|
'src/plugins/fcfs.c',
|
|
'src/plugins/builtin_fcfs.c',
|
|
'src/plugins/seqjob_allocator.c',
|
|
'src/plugins/parjob_allocator.c',
|
|
'src/plugins/limit.c',
|
|
]
|
|
|
|
incdir = include_directories('src',
|
|
'include',
|
|
'../include',
|
|
'../lib')
|
|
|
|
scheduler_deps = [
|
|
libxce_dep,
|
|
librtti_dep,
|
|
math_dep,
|
|
tinylog_dep,
|
|
thread_dep
|
|
]
|
|
|
|
scheduler = executable('xce_scheduler',
|
|
scheduler_srcs,
|
|
include_directories: incdir,
|
|
dependencies: scheduler_deps,
|
|
link_args: wrap_link_args,
|
|
install: true)
|
|
|
|
# Task 4.1 (scheduler-core spec, Req 5.1/5.2): isolated compile target for
|
|
# core.c alone, consumed by testsuite/test_core_isolation.c to prove at
|
|
# build time that core.c references zero symbols from the networking/API
|
|
# libraries (netio/xceapi/client/delay/idgen). A static_library() here need
|
|
# not LINK against anything for this purpose -- compiling src/core.c to an
|
|
# object is enough; the object's own undefined-symbol table (inspected via
|
|
# nm(1) in the test) reflects exactly what core.c's code calls, independent
|
|
# of which libraries are nominally "dependencies" of this build target.
|
|
sched_core_isolation_lib = static_library(
|
|
'sched_core_isolation',
|
|
['src/core.c'],
|
|
include_directories: incdir,
|
|
dependencies: scheduler_deps,
|
|
install: false)
|
|
|
|
# Task 11.3 (scheduler-core spec, Req 5 AC 17): isolated compile target for
|
|
# the simulation driver's own files, consumed by
|
|
# testsuite/test_sim_isolation.c to prove at build time that sim.c/sim_loop.c
|
|
# reference zero controller-facing symbols (client/netio/xceapi/delay/idgen).
|
|
# Both files are compiled together into ONE archive -- task 11.2 added
|
|
# sim_loop.c as a sibling file to task 11.1's sim.c, and covering only one of
|
|
# them would repeat core.c's own siblings' (core_events.c/core_session.c/
|
|
# core_clock.c) never-mechanically-covered gap for the sim driver. Same
|
|
# "compiling to an object is enough, no real linking needed" rationale as
|
|
# sched_core_isolation_lib above.
|
|
sched_sim_isolation_lib = static_library(
|
|
'sched_sim_isolation',
|
|
['src/sim.c', 'src/sim_loop.c'],
|
|
include_directories: incdir,
|
|
dependencies: scheduler_deps,
|
|
install: false)
|
|
|
|
subdir('testsuite')
|