summaryrefslogtreecommitdiff
path: root/build/snap.zig
diff options
context:
space:
mode:
Diffstat (limited to 'build/snap.zig')
-rw-r--r--build/snap.zig23
1 files changed, 21 insertions, 2 deletions
diff --git a/build/snap.zig b/build/snap.zig
index 6b3d2104..35a246ad 100644
--- a/build/snap.zig
+++ b/build/snap.zig
@@ -44,11 +44,30 @@ pub fn addTty(b: *std.Build, opts: struct {
const run_snap = b.addRunArtifact(snap);
run_snap.addArtifactArg(opts.exe);
run_snap.addPrefixedFileArg("--lspmock=", lspmock.getEmittedBin());
- if (b.args) |args| run_snap.addArgs(args);
+ run_snap.addPassthruArgs();
// scripts fork children and drive real ptys: never cached, never "up to date"
run_snap.has_side_effects = true;
const snap_step = b.step("snap", "run the snapshot parity suite (-- --update regenerates goldens)");
snap_step.dependOn(&run_snap.step);
+ // Random scripts through pardes-snap, hunting panics (test/monkey.zig):
+ // not a gate, it is slow and random over seeds; a seed replays.
+ const monkey = b.addExecutable(.{
+ .name = "pardes-monkey",
+ .root_module = b.createModule(.{
+ .target = opts.target,
+ .optimize = opts.optimize,
+ .root_source_file = b.path("test/monkey.zig"),
+ .link_libc = true,
+ }),
+ });
+ const run_monkey = b.addRunArtifact(monkey);
+ run_monkey.addArtifactArg(snap);
+ run_monkey.addArtifactArg(opts.exe);
+ run_monkey.addPassthruArgs();
+ run_monkey.has_side_effects = true;
+ b.step("monkey", "random snapshot scripts hunting panics (-- <seeds> [steps] [--from=N] [--out=DIR])").dependOn(&run_monkey.step);
+ const monkey_tests = b.addTest(.{ .root_module = monkey.root_module });
+ b.step("monkey-test", "test the monkey's generator and panic detector").dependOn(&b.addRunArtifact(monkey_tests).step);
const run_driver_test = b.addRunArtifact(snap);
run_driver_test.addArg("--self-test");
run_driver_test.has_side_effects = true;
@@ -82,7 +101,7 @@ pub fn addWeb(b: *std.Build) void {
run_web_snap.step.dependOn(&build_web_snap.step);
run_web_snap.step.dependOn(&driver_test.step);
run_web_snap.has_side_effects = true;
- if (b.args) |args| run_web_snap.addArgs(args);
+ run_web_snap.addPassthruArgs();
b.step("web-snap", "run browser highlighting, touch, Look, resize and scroll checks").dependOn(&run_web_snap.step);
b.step("web-e2e", "run the Chrome-driven DOM end-to-end suite").dependOn(&run_web_snap.step);
}