mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 06:45:24 +00:00
std.build: add support for custom test runner
This commit is contained in:
parent
55c91fc42d
commit
33a401dd60
@ -1509,6 +1509,7 @@ pub const LibExeObjStep = struct {
|
||||
name_prefix: []const u8,
|
||||
filter: ?[]const u8,
|
||||
test_evented_io: bool = false,
|
||||
test_runner: ?[]const u8,
|
||||
code_model: std.builtin.CodeModel = .default,
|
||||
wasi_exec_model: ?std.builtin.WasiExecModel = null,
|
||||
/// Symbols to be exported when compiling to wasm
|
||||
@ -1772,6 +1773,7 @@ pub const LibExeObjStep = struct {
|
||||
.exec_cmd_args = null,
|
||||
.name_prefix = "",
|
||||
.filter = null,
|
||||
.test_runner = null,
|
||||
.disable_stack_probing = false,
|
||||
.disable_sanitize_c = false,
|
||||
.sanitize_thread = false,
|
||||
@ -2670,6 +2672,11 @@ pub const LibExeObjStep = struct {
|
||||
try zig_args.append(self.name_prefix);
|
||||
}
|
||||
|
||||
if (self.test_runner) |test_runner| {
|
||||
try zig_args.append("--test-runner");
|
||||
try zig_args.append(builder.pathFromRoot(test_runner));
|
||||
}
|
||||
|
||||
for (builder.debug_log_scopes) |log_scope| {
|
||||
try zig_args.append("--debug-log");
|
||||
try zig_args.append(log_scope);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user