From d3d5849f558bec48490819f95e4f15ca0d6a36e7 Mon Sep 17 00:00:00 2001 From: torque Date: Sun, 27 Aug 2023 18:05:33 -0700 Subject: [PATCH] build test: install unit tests binary I've gotten tired of trying to find this in the cache dir, since the build system does not rerun it once it is cached. Also sometimes the build runner does weird things to the output. --- build.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.zig b/build.zig index 8151bb8..c1a70ba 100644 --- a/build.zig +++ b/build.zig @@ -19,6 +19,7 @@ pub fn build(b: *std.Build) void { }); const tests = b.addTest(.{ + .name = "nats-zig-unit-tests", .root_source_file = .{ .path = "tests/main.zig" }, .target = target, .optimize = optimize, @@ -29,6 +30,7 @@ pub fn build(b: *std.Build) void { const run_main_tests = b.addRunArtifact(tests); const test_step = b.step("test", "Run tests"); + test_step.dependOn(&b.addInstallArtifact(tests, .{}).step); test_step.dependOn(&run_main_tests.step); add_examples(b, .{