summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-04 21:29:23 -0300
committerGabriel Schneider <[email protected]>2026-11-04 21:29:23 -0300
commit528a66cc720b25252a497adeb358e729dc8f3a62 (patch)
tree872890f4f70d8a1ef07eba9a0f6fe72b491ee883 /build
parente67a1a561d9a9a7269bcc7c9af5678d3f50a95cb (diff)
downloadpardes-528a66cc720b25252a497adeb358e729dc8f3a62.tar.gz
pardes-528a66cc720b25252a497adeb358e729dc8f3a62.zip
test: the window's own tests in Zig (T4, test/process/window.zig), gui_monkey.py and gui_golden.py gone: the monkey drives the hidden window's own input (Detached.typeKeys into its pty, Detached.mouse's OSC 777 events) with clicks, drags, wheels, hovers and keys, and columns, looks, Joincol, Collapse, Delcol and themes over 9P, then the window must settle, alive, with no crash record (two combinations of 30 steps in process-test, all 40 Motion x Lift x Bloom with zig build monkey-gui -Dplatform=gui); the goldens hash the 17 scenes' frames (Detached.capture, a transition's frame 6 too) against test/gui-goldens.txt, regenerated for the offscreen window and twice reproduced, run when asked (zig build gui-golden -Dplatform=gui, PARDES_GUI_GOLDEN=update); Detached's init file, settle and capture; no Python step left in the build
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
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());