summaryrefslogtreecommitdiff
path: root/build/snap.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-30 17:35:06 -0300
committerGabriel Schneider <[email protected]>2026-10-30 17:35:06 -0300
commit6d8da8721141284cf33bb901168b26135893eb86 (patch)
tree791d63401d4e85fbca1d597a8ce0326e70efd545 /build/snap.zig
parentefd43a3a2cf03bb741366331158b368abf9ac583 (diff)
parentbf6810a8f9d6cc82050e7d9c0cfb06358301b574 (diff)
downloadpardes-6d8da8721141284cf33bb901168b26135893eb86.tar.gz
pardes-6d8da8721141284cf33bb901168b26135893eb86.zip
Merge latest upstream into the macOS branch for Zig 0.17
Retain the macOS branch history and local Acme selection color while adopting upstream's current core and platform changes. Pin Zig and ZLS to 0.17.0, and fetch the existing zstbi compatibility commit through upstream after its original fork was removed.
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);
}