| author | |
| committer | |
| log | 2956232b427276c6ad1e52678e1cf3651976ec39 |
| tree | 89effad800b1a314a4a2d737bd7187036c8755c6 |
| parent | 2c326c87b16a0b8febf5347292ba61a592467d8c |
Without this, aarch64-linux tried to compile this test for
aarch64-windows with the same CPU settings, which is not an intended
test combination.2 files changed, 6 insertions(+), 1 deletions(-)
test/standalone.zig+3-1| ... | @@ -5,6 +5,8 @@ pub const SimpleCase = struct { | ... | @@ -5,6 +5,8 @@ pub const SimpleCase = struct { |
| 5 | target: std.zig.CrossTarget = .{}, | 5 | target: std.zig.CrossTarget = .{}, |
| 6 | is_test: bool = false, | 6 | is_test: bool = false, |
| 7 | is_exe: bool = true, | 7 | is_exe: bool = true, |
| 8 | /// Run only on this OS. | ||
| 9 | os_filter: ?std.Target.Os.Tag = null, | ||
| 8 | }; | 10 | }; |
| 9 | 11 | ||
| 10 | pub const BuildCase = struct { | 12 | pub const BuildCase = struct { |
| ... | @@ -50,7 +52,7 @@ pub const simple_cases = [_]SimpleCase{ | ... | @@ -50,7 +52,7 @@ pub const simple_cases = [_]SimpleCase{ |
| 50 | 52 | ||
| 51 | .{ | 53 | .{ |
| 52 | .src_path = "test/standalone/issue_9402/main.zig", | 54 | .src_path = "test/standalone/issue_9402/main.zig", |
| 53 | .target = .{ .os_tag = .windows }, | 55 | .os_filter = .windows, |
| 54 | .link_libc = true, | 56 | .link_libc = true, |
| 55 | }, | 57 | }, |
| 56 | 58 |
test/tests.zig+3| ... | @@ -571,6 +571,9 @@ pub fn addStandaloneTests( | ... | @@ -571,6 +571,9 @@ pub fn addStandaloneTests( |
| 571 | for (standalone.simple_cases) |case| { | 571 | for (standalone.simple_cases) |case| { |
| 572 | for (optimize_modes) |optimize| { | 572 | for (optimize_modes) |optimize| { |
| 573 | if (!case.all_modes and optimize != .Debug) continue; | 573 | if (!case.all_modes and optimize != .Debug) continue; |
| 574 | if (case.os_filter) |os_tag| { | ||
| 575 | if (os_tag != builtin.os.tag) continue; | ||
| 576 | } | ||
| 574 | 577 | ||
| 575 | if (case.is_exe) { | 578 | if (case.is_exe) { |
| 576 | const exe = b.addExecutable(.{ | 579 | const exe = b.addExecutable(.{ |