From b21b861fef0219ba4e7ab8209c629daa796494f1 Mon Sep 17 00:00:00 2001 From: SMC17 <173011278+SMC17@users.noreply.github.com> Date: Tue, 17 Nov 2026 18:01:52 -0600 Subject: [PATCH] build: add a top-level test step The workspace build.zig defined test-core, test-all and test-frontier but no `test` step, so `zig build test` failed with "no step named 'test'". Add `test` as the aggregate of test-core and test-all (the in-process unit suites). test-frontier stays separate: it shells out to jq, python3 and nested builds. Record measured test counts in README and PLATFORM.md. Co-Authored-By: Claude Opus 5.5 --- PLATFORM.md | 2 +- README.md | 1 + build.zig | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/PLATFORM.md b/PLATFORM.md index 998588a..db8e98e 100644 --- a/PLATFORM.md +++ b/PLATFORM.md @@ -147,7 +147,7 @@ zig build test From workspace root: ```sh -zig build test-core # 75 tests: core + viz + examples +zig build test-core # 159 tests: core + viz + examples zig build run-example # canonical box-barge case zig build run-full-assessment # stability + Holtrop resistance python tools/cli/yard-cli.py stability --L 10 --B 4 --T 1.5 --kg 1.0 --json diff --git a/README.md b/README.md index ebcd29c..4866fb8 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,7 @@ route ensemble, then bound to a replay head before Arena scores it. # Requires Zig 0.16.0 git clone https://github.com/SMC17/yard.git cd yard +zig build test # test-core + test-all (1688 tests) zig build test-core # hydro + stability + compose + spiral + benchmark zig build test-all # all 72 primitive-module suites zig build test-frontier # Mercury + Arena + fleet + telemetry + viewer + governed 1778 conflict diff --git a/build.zig b/build.zig index 0c64dda..2756f13 100644 --- a/build.zig +++ b/build.zig @@ -265,6 +265,10 @@ pub fn build(b: *std.Build) void { } } + const test_step = b.step("test", "Run test-core and test-all"); + test_step.dependOn(test_core); + test_step.dependOn(test_all); + const run_example = b.step("run-example", "Run box-barge intact stability example"); const exe = b.addExecutable(.{ .name = "box-barge-example",