diff options
Diffstat (limited to 'build')
| -rw-r--r-- | build/snap.zig | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/build/snap.zig b/build/snap.zig index 02ec6f9e..841f4fcd 100644 --- a/build/snap.zig +++ b/build/snap.zig @@ -30,13 +30,19 @@ pub fn addTty(b: *std.Build, opts: struct { .freebsd, .netbsd, .openbsd => snap.root_module.linkSystemLibrary("util", .{}), else => {}, } - b.installArtifact(snap); + // Installed by `snap` and not by the default install step, and into + // `<prefix>/dev` rather than `<prefix>/bin`: a bare `zig build` installs + // the two shells into the user's own bin directory, and this harness is + // neither of them. + const install_snap = &b.addInstallArtifact(snap, .{ .dest_dir = .{ .override = .{ .custom = "dev" } } }).step; const run_snap = b.addRunArtifact(snap); run_snap.addArtifactArg(opts.exe); if (b.args) |args| run_snap.addArgs(args); // scripts fork children and drive real ptys: never cached, never "up to date" run_snap.has_side_effects = true; - b.step("snap", "run the snapshot parity suite (-- --update regenerates goldens)").dependOn(&run_snap.step); + const snap_step = b.step("snap", "run the snapshot parity suite (-- --update regenerates goldens)"); + snap_step.dependOn(install_snap); + snap_step.dependOn(&run_snap.step); } /// Browser regression suite: make an isolated freestanding web build from the |
