diff options
| author | Haze Booth <isnt@haze.cool> | 2020-05-05 11:49:33 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-05-05 15:16:54 -0400 |
| commit | a39cb034ea0ae4f608ebcd7fa98df5d58d638668 (patch) | |
| tree | 0dd6481cdfa617d3896c916ad1feb816ba0b3654 /lib | |
| parent | b13a02ed1aaab407a29b37bb5559639bf3a69715 (diff) | |
| download | zig-a39cb034ea0ae4f608ebcd7fa98df5d58d638668.tar.gz zig-a39cb034ea0ae4f608ebcd7fa98df5d58d638668.zip | |
Add setUseTestEventedIO for test steps in build.zig
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/std/build.zig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/std/build.zig b/lib/std/build.zig index 85a65393ec..2b7eb254ee 100644 --- a/lib/std/build.zig +++ b/lib/std/build.zig @@ -1132,6 +1132,7 @@ pub const LibExeObjStep = struct { name_prefix: []const u8, filter: ?[]const u8, single_threaded: bool, + evented_io: bool = false, code_model: builtin.CodeModel = .default, root_src: ?FileSource, @@ -1559,6 +1560,11 @@ pub const LibExeObjStep = struct { self.filter = text; } + pub fn setUseTestEventedIo(self: *LibExeObjStep, use_evented_io: bool) void { + assert(self.kind == Kind.Test); + self.evented_io = use_evented_io; + } + pub fn addCSourceFile(self: *LibExeObjStep, file: []const u8, args: []const []const u8) void { self.addCSourceFileSource(.{ .args = args, @@ -1864,6 +1870,10 @@ pub const LibExeObjStep = struct { try zig_args.append(filter); } + if (self.evented_io) { + try zig_args.append("--test-evented-io"); + } + if (self.name_prefix.len != 0) { try zig_args.append("--test-name-prefix"); try zig_args.append(self.name_prefix); |
