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 @@
11pub fn build(b: *std.Build) void {
2 // To avoid having to explicitly link required system libraries into the final test
3 // executable (e.g. ntdll on Windows), we'll just link everything with libc here.
2 const is_windows = b.graph.host.result.os.tag == .windows;
43
54 const test_obj = b.addTest(.{
65 .emit_object = true,
76 .root_module = b.createModule(.{
87 .root_source_file = b.path("src/main.zig"),
98 .target = b.graph.host,
10 .link_libc = true,
119 }),
1210 });
11 if (is_windows) {
12 test_obj.linkSystemLibrary("ntdll");
13 test_obj.linkSystemLibrary("kernel32");
14 }
1315
1416 const test_exe_mod = b.createModule(.{
1517 .root_source_file = null,
1618 .target = b.graph.host,
17 .link_libc = true,
1819 });
1920 test_exe_mod.addObject(test_obj);
2021 const test_exe = b.addExecutable(.{
......@@ -26,7 +27,10 @@ pub fn build(b: *std.Build) void {
2627 b.default_step = test_step;
2728
2829 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 }
3034 test_step.dependOn(&test_run.step);
3135}
3236