diff options
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 32 |
1 files changed, 31 insertions, 1 deletions
@@ -1622,7 +1622,37 @@ pub fn build(b: *std.Build) void { if (enable_quic) run_fs_test.addArg("--quic"); run_fs_test.setCwd(b.path(".")); run_fs_test.has_side_effects = true; - b.step("fs-test", "exercise default 9P service and mounts with an independent client").dependOn(&run_fs_test.step); + 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); + if (b.args) |args| run_monkey9p.addArgs(args); + 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. + 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" }); + run_monkey_gui.addArtifactArg(exe); + if (b.args) |args| run_monkey_gui.addArgs(args); + run_monkey_gui.setCwd(b.path(".")); + 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); |
