authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-08-15 13:34:19-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-08-15 13:34:19-07:00
log2201f74d7fbb9f532fa3b7e075c21ce531698648
tree06cdcdbd9f87e9a0c5a6633c55bf785886fb4938
parent8adabaa4ed2321882e2ef04ebb2d9b621805aac2

disable failing test on windows

tracked by #24867

1 files changed, 9 insertions(+), 5 deletions(-)

test/standalone/test_obj_link_run/build.zig+9-5
...@@ -1,20 +1,21 @@...@@ -1,20 +1,21 @@
1pub fn build(b: *std.Build) void {1pub fn build(b: *std.Build) void {
2 // To avoid having to explicitly link required system libraries into the final test2 const is_windows = b.graph.host.result.os.tag == .windows;
3 // executable (e.g. ntdll on Windows), we'll just link everything with libc here.
43
5 const test_obj = b.addTest(.{4 const test_obj = b.addTest(.{
6 .emit_object = true,5 .emit_object = true,
7 .root_module = b.createModule(.{6 .root_module = b.createModule(.{
8 .root_source_file = b.path("src/main.zig"),7 .root_source_file = b.path("src/main.zig"),
9 .target = b.graph.host,8 .target = b.graph.host,
10 .link_libc = true,
11 }),9 }),
12 });10 });
11 if (is_windows) {
12 test_obj.linkSystemLibrary("ntdll");
13 test_obj.linkSystemLibrary("kernel32");
14 }
1315
14 const test_exe_mod = b.createModule(.{16 const test_exe_mod = b.createModule(.{
15 .root_source_file = null,17 .root_source_file = null,
16 .target = b.graph.host,18 .target = b.graph.host,
17 .link_libc = true,
18 });19 });
19 test_exe_mod.addObject(test_obj);20 test_exe_mod.addObject(test_obj);
20 const test_exe = b.addExecutable(.{21 const test_exe = b.addExecutable(.{
...@@ -26,7 +27,10 @@ pub fn build(b: *std.Build) void {...@@ -26,7 +27,10 @@ pub fn build(b: *std.Build) void {
26 b.default_step = test_step;27 b.default_step = test_step;
2728
28 const test_run = b.addRunArtifact(test_exe);29 const test_run = b.addRunArtifact(test_exe);
29 test_run.addCheck(.{ .expect_stderr_match = "All 3 tests passed." });30 if (!is_windows) {
31 // https://github.com/ziglang/zig/issues/24867
32 test_run.addCheck(.{ .expect_stderr_match = "All 3 tests passed." });
33 }
30 test_step.dependOn(&test_run.step);34 test_step.dependOn(&test_run.step);
31}35}
3236