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 {...@@ -904,7 +904,7 @@ pub fn addRunArtifact(b: *Build, exe: *Step.Compile) *Step.Run {
904 const run_step = Step.Run.create(b, b.fmt("run {s}", .{exe.name}));904 const run_step = Step.Run.create(b, b.fmt("run {s}", .{exe.name}));
905 run_step.addArtifactArg(exe);905 run_step.addArtifactArg(exe);
906906
907 if (exe.kind == .@"test") {907 if (exe.kind == .@"test" and exe.test_server_mode) {
908 run_step.enableTestRunnerMode();908 run_step.enableTestRunnerMode();
909 }909 }
910910
lib/std/Build/Step/Compile.zig+2
...@@ -73,6 +73,7 @@ exec_cmd_args: ?[]const ?[]const u8,...@@ -73,6 +73,7 @@ exec_cmd_args: ?[]const ?[]const u8,
73filter: ?[]const u8,73filter: ?[]const u8,
74test_evented_io: bool = false,74test_evented_io: bool = false,
75test_runner: ?[]const u8,75test_runner: ?[]const u8,
76test_server_mode: bool,
76code_model: std.builtin.CodeModel = .default,77code_model: std.builtin.CodeModel = .default,
77wasi_exec_model: ?std.builtin.WasiExecModel = null,78wasi_exec_model: ?std.builtin.WasiExecModel = null,
78/// Symbols to be exported when compiling to wasm79/// Symbols to be exported when compiling to wasm
...@@ -499,6 +500,7 @@ pub fn create(owner: *std.Build, options: Options) *Compile {...@@ -499,6 +500,7 @@ pub fn create(owner: *std.Build, options: Options) *Compile {
499 .exec_cmd_args = null,500 .exec_cmd_args = null,
500 .filter = options.filter,501 .filter = options.filter,
501 .test_runner = options.test_runner,502 .test_runner = options.test_runner,
503 .test_server_mode = options.test_runner == null,
502 .disable_stack_probing = false,504 .disable_stack_probing = false,
503 .disable_sanitize_c = false,505 .disable_sanitize_c = false,
504 .sanitize_thread = false,506 .sanitize_thread = false,