aboutsummaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-09-14 14:56:45 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-09-14 14:56:45 -0700
commit85b10eb07c27d021804473ee54a0b5942e4784d5 (patch)
tree1c3450ba81bed2e4125bf21e21ce2e03631ca53e /build.zig
parent5523e2061b37de2b884c1c53fdcefb823755c7d0 (diff)
downloadzig-85b10eb07c27d021804473ee54a0b5942e4784d5.tar.gz
zig-85b10eb07c27d021804473ee54a0b5942e4784d5.zip
ZIG_EXE envirnoment variable instead of testing build options
No longer introduce build options for tests. Instead, ZIG_EXE environment variable is added to any invocation of `zig run` or `zig test`. The end result of this branch is the same: there is no longer a mandatory positional command line argument when invoking zig test binaries directly.
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig7
1 files changed, 1 insertions, 6 deletions
diff --git a/build.zig b/build.zig
index 2422a2a94c..3bb5474ce3 100644
--- a/build.zig
+++ b/build.zig
@@ -40,17 +40,12 @@ pub fn build(b: *Builder) !void {
const docs_step = b.step("docs", "Build documentation");
docs_step.dependOn(&docgen_cmd.step);
- var test_cases = b.addTest("src/test.zig");
+ const test_cases = b.addTest("src/test.zig");
test_cases.stack_size = stack_size;
test_cases.setBuildMode(mode);
test_cases.addPackagePath("test_cases", "test/cases.zig");
test_cases.single_threaded = single_threaded;
- const test_options = b.addOptions();
- test_options.addOption([]const u8, "zig_exe_path", b.zig_exe);
- test_cases.addOptions("test_options", test_options);
- test_cases.step.dependOn(&test_options.step);
-
const fmt_build_zig = b.addFmt(&[_][]const u8{"build.zig"});
const skip_debug = b.option(bool, "skip-debug", "Main test suite skips debug builds") orelse false;