Add setUseTestEventedIO for test steps in build.zig
parent
b13a02ed1a
commit
a39cb034ea
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue