authorgravatar for 4678790+dweiller@users.noreply.github.comDominic <4678790+dweiller@users.noreply.github.com> 2022-11-01 11:57:43+11:00
committergravatar for 4678790+dweiller@users.noreply.github.comDominic <4678790+dweiller@users.noreply.github.com> 2022-11-02 19:45:23+11:00
log33a401dd603ec76805ebb5c933fe41f1dfeabd5b
treeee72b87dc3eee618a534ffe855f60c00a63f501e
parent55c91fc42d048a18c724bdaffe3709bef8aa143e

std.build: add support for custom test runner


1 files changed, 7 insertions(+), 0 deletions(-)

lib/std/build.zig+7
......@@ -1509,6 +1509,7 @@ pub const LibExeObjStep = struct {
15091509 name_prefix: []const u8,
15101510 filter: ?[]const u8,
15111511 test_evented_io: bool = false,
1512 test_runner: ?[]const u8,
15121513 code_model: std.builtin.CodeModel = .default,
15131514 wasi_exec_model: ?std.builtin.WasiExecModel = null,
15141515 /// Symbols to be exported when compiling to wasm
......@@ -1772,6 +1773,7 @@ pub const LibExeObjStep = struct {
17721773 .exec_cmd_args = null,
17731774 .name_prefix = "",
17741775 .filter = null,
1776 .test_runner = null,
17751777 .disable_stack_probing = false,
17761778 .disable_sanitize_c = false,
17771779 .sanitize_thread = false,
......@@ -2670,6 +2672,11 @@ pub const LibExeObjStep = struct {
26702672 try zig_args.append(self.name_prefix);
26712673 }
26722674
2675 if (self.test_runner) |test_runner| {
2676 try zig_args.append("--test-runner");
2677 try zig_args.append(builder.pathFromRoot(test_runner));
2678 }
2679
26732680 for (builder.debug_log_scopes) |log_scope| {
26742681 try zig_args.append("--debug-log");
26752682 try zig_args.append(log_scope);