diff options
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 65 |
1 files changed, 25 insertions, 40 deletions
@@ -1704,26 +1704,9 @@ pub fn build(b: *std.Build) void { syntax_test_step.dependOn(&run_syntax_test.step); if (testMatch(b, unit_profile, test_filters, syntax_test_step)) |check| check.addArtifactArg(syntax_test); - const run_fs_test = b.addSystemCommand(&.{ "python3", "-B", "test/fs.py" }); - run_fs_test.addArtifactArg(exe); - if (enable_quic) run_fs_test.addArg("--quic"); - run_fs_test.setCwd(b.path(".")); - run_fs_test.has_side_effects = true; - const fs_test_step = b.step("fs-test", "exercise default 9P service and mounts with an independent client"); - fs_test_step.dependOn(&run_fs_test.step); - - // Random 9P operations against a throwaway detached session, checking - // the documented rules (test/monkey9p.py). The fixed-seed smoke run is - // part of fs-test; the long run is manual. - const run_monkey9p = b.addSystemCommand(&.{ "python3", "-B", "test/monkey9p.py" }); - run_monkey9p.addArtifactArg(exe); - run_monkey9p.addPassthruArgs(); - run_monkey9p.setCwd(b.path(".")); - run_monkey9p.has_side_effects = true; - b.step("monkey-9p", "random 9P operations checking the documented rules (-- [--seed N]... [--steps M] [--replay F] [--shrink F] [--no-shrink])").dependOn(&run_monkey9p.step); // The GUI's effects under random input in a hidden test window, each - // Motion x Lift x Bloom (test/gui_monkey.py): a gate, not part of - // fs-test, since it needs a Wayland display. + // Motion x Lift x Bloom (test/gui_monkey.py): a gate, run by hand, + // since it needs a Wayland display. const monkey_gui_step = b.step("monkey-gui", "random input to hidden GUI test windows across the effect settings (-Dplatform=gui; -- [--seed N] [--steps M])"); if (platform == .gui) { const run_monkey_gui = b.addSystemCommand(&.{ "python3", "-B", "test/gui_monkey.py" }); @@ -1733,27 +1716,6 @@ pub fn build(b: *std.Build) void { run_monkey_gui.has_side_effects = true; monkey_gui_step.dependOn(&run_monkey_gui.step); } else monkey_gui_step.dependOn(&b.addFail("monkey-gui needs -Dplatform=gui").step); - const run_monkey9p_smoke = b.addSystemCommand(&.{ "python3", "-B", "test/monkey9p.py" }); - run_monkey9p_smoke.addArtifactArg(exe); - run_monkey9p_smoke.addArg("--smoke"); - run_monkey9p_smoke.setCwd(b.path(".")); - run_monkey9p_smoke.has_side_effects = true; - b.step("monkey-9p-smoke", "a short fixed-seed 9P monkey run (part of fs-test)").dependOn(&run_monkey9p_smoke.step); - fs_test_step.dependOn(&run_monkey9p_smoke.step); - - const run_discovery = b.addSystemCommand(&.{ "python3", "-B", "test/fs.py" }); - run_discovery.addArtifactArg(exe); - run_discovery.addArg("--discovery"); - run_discovery.setCwd(b.path(".")); - run_discovery.has_side_effects = true; - b.step("fs-discovery-test", "test browsable pane creation over 9P").dependOn(&run_discovery.step); - - const run_agent_session_test = b.addSystemCommand(&.{ "python3", "-B", "test/agent_session_test.py" }); - run_agent_session_test.addArtifactArg(exe); - if (platform == .gui) run_agent_session_test.addArg("--gui-grid"); - run_agent_session_test.setCwd(b.path(".")); - run_agent_session_test.has_side_effects = true; - b.step("agent-session-test", "test interactive session readiness, input and cleanup through 9P").dependOn(&run_agent_session_test.step); const history = b.addExecutable(.{ .name = "pardes-history", @@ -1863,6 +1825,29 @@ pub fn build(b: *std.Build) void { const behaviour_test_step = b.step("behaviour-test", "run the behavioural tests, through the 9P tree alone (test/behaviour/)"); behaviour_test_step.dependOn(&run_behaviour_tests.step); if (testMatch(b, unit_profile, test_filters, behaviour_test_step)) |check| check.addArtifactArg(behaviour_tests); + // The 9P monkey at T1 (test/monkey9p.zig): random requests against + // an in-process session, the documented rules checked after each. + // Its fixed-seed smoke run is part of behaviour-test. + const monkey_session = b.addExecutable(.{ + .name = "pardes-monkey-session", + .root_module = b.createModule(.{ + .target = target, + .optimize = optimize, + .root_source_file = b.path("test/monkey9p.zig"), + .link_libc = true, + }), + }); + monkey_session.root_module.addImport("session", session_module); + const run_monkey_session = b.addRunArtifact(monkey_session); + run_monkey_session.addPassthruArgs(); + run_monkey_session.has_side_effects = true; + b.step("monkey-session", "random 9P requests against an in-process session, checking the documented rules (-- [--seed N]... [--steps M] [--only i,j,k] [--no-shrink] [-v])").dependOn(&run_monkey_session.step); + const run_monkey_session_smoke = b.addRunArtifact(monkey_session); + run_monkey_session_smoke.addArg("--smoke"); + run_monkey_session_smoke.has_side_effects = true; + const monkey_session_smoke_step = b.step("monkey-session-smoke", "a short fixed-seed run of monkey-session (part of behaviour-test)"); + monkey_session_smoke_step.dependOn(&run_monkey_session_smoke.step); + if (test_filters.len == 0) behaviour_test_step.dependOn(&run_monkey_session_smoke.step); // Kitty graphics conformance at the core: what a terminal pane's // program sends, what it reads back, what ghostty stores and what a |
