summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/snap.zig23
1 files changed, 23 insertions, 0 deletions
diff --git a/build/snap.zig b/build/snap.zig
index 544144d9..d29eac42 100644
--- a/build/snap.zig
+++ b/build/snap.zig
@@ -68,6 +68,29 @@ pub fn addTty(b: *std.Build, opts: struct {
run_process_test.addPassthruArgs();
run_process_test.has_side_effects = true;
b.step("process-test", "run the process tests: real sessions driven over their sockets (-- [filter])").dependOn(&run_process_test.step);
+ // The window's own, run in full when asked (test/process/window.zig):
+ // the monkey over every Motion x Lift x Bloom, and the frames against
+ // this machine's goldens (PARDES_GUI_GOLDEN=update rewrites them).
+ const monkey_gui_step = b.step("monkey-gui", "random input to the hidden window across the effect settings (-Dplatform=gui; PARDES_GUI_MONKEY_SEED, _STEPS)");
+ const gui_golden_step = b.step("gui-golden", "the hidden window's scenes against test/gui-goldens.txt, this machine's (-Dplatform=gui; PARDES_GUI_GOLDEN=update rewrites)");
+ if (opts.gui) {
+ const run_monkey_gui = b.addRunArtifact(process_test);
+ run_monkey_gui.addArtifactArg(opts.exe);
+ run_monkey_gui.addArgs(&.{ "--backend=gui", "window: a monkey" });
+ run_monkey_gui.setEnvironmentVariable("PARDES_GUI_MONKEY", "all");
+ run_monkey_gui.has_side_effects = true;
+ monkey_gui_step.dependOn(&run_monkey_gui.step);
+ const run_gui_golden = b.addRunArtifact(process_test);
+ run_gui_golden.addArtifactArg(opts.exe);
+ run_gui_golden.addArgs(&.{ "--backend=gui", "window: its scenes" });
+ run_gui_golden.setEnvironmentVariable("PARDES_GUI_GOLDEN", b.graph.environ_map.get("PARDES_GUI_GOLDEN") orelse "check");
+ run_gui_golden.setCwd(b.path("."));
+ run_gui_golden.has_side_effects = true;
+ gui_golden_step.dependOn(&run_gui_golden.step);
+ } else {
+ monkey_gui_step.dependOn(&b.addFail("monkey-gui needs -Dplatform=gui").step);
+ gui_golden_step.dependOn(&b.addFail("gui-golden needs -Dplatform=gui").step);
+ }
const run_snap = b.addRunArtifact(snap);
run_snap.addArtifactArg(opts.exe);
run_snap.addPrefixedFileArg("--lspmock=", lspmock.getEmittedBin());