diff --git a/.kiro/specs/xce-harness-component/tasks.md b/.kiro/specs/xce-harness-component/tasks.md index b4e45f14..19b7d51c 100644 --- a/.kiro/specs/xce-harness-component/tasks.md +++ b/.kiro/specs/xce-harness-component/tasks.md @@ -9,7 +9,7 @@ - The 11 removed test files' `.c` sources are left on disk at their current `src/controller/testsuite/` path for now (referenced by no build target) — task 2.1 physically relocates them together with `test_test_cli.c`/`test_xcetest_process_entry.c` - Observable: a harness-scoped build produces an `xce_test` binary; a controller-scoped build run immediately after this single task (no later tasks applied) still succeeds, `controller_unit_test`'s reported test count has dropped by exactly the 11 removed entries, and none of the four standalone binaries are defined anymore - _Requirements: 1.1, 1.2, 1.3, 2.1, 2.2, 2.4_ -- [ ] 1.2 Promote the shared ctrlstatus_fmt.h header and repoint its current consumers +- [x] 1.2 Promote the shared ctrlstatus_fmt.h header and repoint its current consumers - Move `ctrlstatus_fmt.h` to `src/include/xce/`; update the include path in harness's `test.c` and `joblist_display.c` (already relocated in 1.1) and in controller's `test_ctrlstatus.c` - `joblist_display.c`'s own test file, `test_joblist_display.c`, still lives in `src/controller/testsuite/` at this point and is intentionally left untouched here — its include-path fix happens in task 2.2, when that file relocates - Observable: a repo-wide search finds no remaining relative `#include "ctrlstatus_fmt.h"`; all three current consumers include it from `xce/ctrlstatus_fmt.h` diff --git a/src/controller/testsuite/test_ctrlstatus.c b/src/controller/testsuite/test_ctrlstatus.c index e739e4d4..f657a4ab 100644 --- a/src/controller/testsuite/test_ctrlstatus.c +++ b/src/controller/testsuite/test_ctrlstatus.c @@ -22,7 +22,7 @@ #include "persist.h" #include "xce/cluster_def.h" -#include "ctrlstatus_fmt.h" /* ctrlstatus_format_time_ms (task 6.3) */ +#include "xce/ctrlstatus_fmt.h" /* ctrlstatus_format_time_ms (task 6.3) */ /* ── helpers ────────────────────────────────────────────────── */ diff --git a/src/harness/joblist_display.c b/src/harness/joblist_display.c index 192bd4f4..c799115e 100644 --- a/src/harness/joblist_display.c +++ b/src/harness/joblist_display.c @@ -8,7 +8,7 @@ #include /* snprintf */ -#include "ctrlstatus_fmt.h" /* ctrlstatus_format_time_ms */ +#include "xce/ctrlstatus_fmt.h" /* ctrlstatus_format_time_ms */ #include "xce/types.h" /* XCE_WORKER_*, JOB_STAT_* bit definitions */ char* worker_status_str(uint32_t status) diff --git a/src/harness/meson.build b/src/harness/meson.build index de02a13c..3e0bf389 100644 --- a/src/harness/meson.build +++ b/src/harness/meson.build @@ -1,13 +1,4 @@ -# TEMPORARY (xce-harness-component task 1.1): '../controller/testsuite' is -# only here so the bare `#include "ctrlstatus_fmt.h"` in test.c/ -# joblist_display.c keeps resolving -- ctrlstatus_fmt.h itself still -# physically lives at src/controller/testsuite/ctrlstatus_fmt.h pending -# task 1.2, which promotes it to src/include/xce/ctrlstatus_fmt.h and -# repoints these two #include lines at it. Remove this entry when task 1.2 -# lands (it will make it redundant, since src/include is already on this -# path via '../include'). -incdir = include_directories('.', '../include', '../lib', 'include', - '../controller/testsuite') +incdir = include_directories('.', '../include', '../lib', 'include') zlib_dep = dependency('zlib') diff --git a/src/harness/test.c b/src/harness/test.c index 45a45195..505b5949 100644 --- a/src/harness/test.c +++ b/src/harness/test.c @@ -23,7 +23,7 @@ #include "client.h" #include "config.h" /* XCE_MAXNAME_LEN */ #include "controller.capnp.h" -#include "ctrlstatus_fmt.h" /* ctrlstatus_format_time_ms (task 6.3) */ +#include "xce/ctrlstatus_fmt.h" /* ctrlstatus_format_time_ms (task 6.3) */ #include "delay.h" #include "flagspec.h" /* shared flagspec_t descriptor-table flag parsing, * rejection (with typo suggestion), and help diff --git a/src/controller/testsuite/ctrlstatus_fmt.h b/src/include/xce/ctrlstatus_fmt.h similarity index 100% rename from src/controller/testsuite/ctrlstatus_fmt.h rename to src/include/xce/ctrlstatus_fmt.h