authorgravatar for 4678790+dweiller@users.noreply.github.comDominic <4678790+dweiller@users.noreply.github.com> 2023-03-30 17:33:28+11:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-10-20 02:39:17-04:00
logdb18b562acd7d7dd3a35880aabee3b1c34fb043a
tree928058d310524ac7a886ee09171dd982ad76a2aa
parentaa76ca2931d7adbc8ee3b33cdaa2cb1de1adda8a

std.Build: do not assume custom test runners support client-server mode


2 files changed, 3 insertions(+), 1 deletions(-)

lib/std/Build.zig+1-1
......@@ -904,7 +904,7 @@ pub fn addRunArtifact(b: *Build, exe: *Step.Compile) *Step.Run {
904904 const run_step = Step.Run.create(b, b.fmt("run {s}", .{exe.name}));
905905 run_step.addArtifactArg(exe);
906906
907 if (exe.kind == .@"test") {
907 if (exe.kind == .@"test" and exe.test_server_mode) {
908908 run_step.enableTestRunnerMode();
909909 }
910910
lib/std/Build/Step/Compile.zig+2
......@@ -73,6 +73,7 @@ exec_cmd_args: ?[]const ?[]const u8,
7373filter: ?[]const u8,
7474test_evented_io: bool = false,
7575test_runner: ?[]const u8,
76test_server_mode: bool,
7677code_model: std.builtin.CodeModel = .default,
7778wasi_exec_model: ?std.builtin.WasiExecModel = null,
7879/// Symbols to be exported when compiling to wasm
......@@ -499,6 +500,7 @@ pub fn create(owner: *std.Build, options: Options) *Compile {
499500 .exec_cmd_args = null,
500501 .filter = options.filter,
501502 .test_runner = options.test_runner,
503 .test_server_mode = options.test_runner == null,
502504 .disable_stack_probing = false,
503505 .disable_sanitize_c = false,
504506 .sanitize_thread = false,