authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-09-26 00:44:54+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-09-26 01:33:26+02:00
log17f9a25924382240021c6adacbb7bae4a3aafc97
tree54b97ad6ff5a89e01301752205129d1160411331
parent2a88a6a456bebcf6c28d7110a5cd60213f43508e
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

test: remove -Dskip-translate-c from test-standalone

No longer necessary since we've stopped using Clang for this.

5 files changed, 2 insertions(+), 20 deletions(-)

test/standalone/build.zig+1-6
......@@ -9,7 +9,6 @@ pub fn build(b: *std.Build) void {
99 const enable_macos_sdk = b.option(bool, "enable_macos_sdk", "Run tests requiring presence of macOS SDK and frameworks") orelse enable_ios_sdk;
1010 const enable_symlinks_windows = b.option(bool, "enable_symlinks_windows", "Run tests requiring presence of symlinks on Windows") orelse false;
1111 const omit_symlinks = builtin.os.tag == .windows and !enable_symlinks_windows;
12 const skip_translate_c = b.option(bool, "skip_translate_c", "Test suite skips translate-c tests") orelse false;
1312
1413 const simple_skip_debug = b.option(bool, "simple_skip_debug", "Simple tests skip debug builds") orelse false;
1514 const simple_skip_release_safe = b.option(bool, "simple_skip_release_safe", "Simple tests skip release-safe builds") orelse false;
......@@ -21,7 +20,6 @@ pub fn build(b: *std.Build) void {
2120 .skip_release_safe = simple_skip_release_safe,
2221 .skip_release_fast = simple_skip_release_fast,
2322 .skip_release_small = simple_skip_release_small,
24 .skip_translate_c = skip_translate_c,
2523 });
2624 const simple_dep_step = simple_dep.builder.default_step;
2725 simple_dep_step.name = "standalone_test_cases.simple";
......@@ -99,12 +97,9 @@ pub fn build(b: *std.Build) void {
9997 pkg.build_zig.requires_macos_sdk;
10098 const requires_symlinks = @hasDecl(pkg.build_zig, "requires_symlinks") and
10199 pkg.build_zig.requires_symlinks;
102 const requires_translate_c = @hasDecl(pkg.build_zig, "requires_translate_c") and
103 pkg.build_zig.requires_translate_c;
104100 if ((requires_symlinks and omit_symlinks) or
105101 (requires_macos_sdk and !enable_macos_sdk) or
106 (requires_ios_sdk and !enable_ios_sdk) or
107 (requires_translate_c and skip_translate_c))
102 (requires_ios_sdk and !enable_ios_sdk))
108103 {
109104 continue :add_dep_steps;
110105 }
test/standalone/dep_lazypath/build.zig-2
......@@ -1,7 +1,5 @@
11const std = @import("std");
22
3pub const requires_translate_c = true;
4
53pub fn build(b: *std.Build) void {
64 const test_step = b.step("test", "Test it");
75 b.default_step = test_step;
test/standalone/glibc_compat/build.zig-2
......@@ -1,8 +1,6 @@
11const std = @import("std");
22const builtin = @import("builtin");
33
4pub const requires_translate_c = true;
5
64// To run executables linked against a specific glibc version, the
75// run-time glibc version needs to be new enough. Check the host's glibc
86// version. Note that this does not allow for translation/vm/emulation
test/standalone/issue_794/build.zig-2
......@@ -1,7 +1,5 @@
11const std = @import("std");
22
3pub const requires_translate_c = true;
4
53pub fn build(b: *std.Build) void {
64 const test_step = b.step("test", "Test it");
75 b.default_step = test_step;
test/standalone/simple/build.zig+1-8
......@@ -9,7 +9,6 @@ pub fn build(b: *std.Build) void {
99 const skip_release_safe = b.option(bool, "skip_release_safe", "Skip release-safe builds") orelse false;
1010 const skip_release_fast = b.option(bool, "skip_release_fast", "Skip release-fast builds") orelse false;
1111 const skip_release_small = b.option(bool, "skip_release_small", "Skip release-small builds") orelse false;
12 const skip_translate_c = b.option(bool, "skip_translate_c", "Test suite skips translate-c tests") orelse false;
1312
1413 var optimize_modes_buf: [4]std.builtin.OptimizeMode = undefined;
1514 var optimize_modes_len: usize = 0;
......@@ -37,7 +36,6 @@ pub fn build(b: *std.Build) void {
3736 if (case.os_filter) |os_tag| {
3837 if (os_tag != builtin.os.tag) continue;
3938 }
40 if (case.uses_translate_c and skip_translate_c) continue;
4139
4240 const resolved_target = b.resolveTargetQuery(case.target);
4341
......@@ -84,7 +82,6 @@ const Case = struct {
8482 is_exe: bool = true,
8583 /// Run only on this OS.
8684 os_filter: ?std.Target.Os.Tag = null,
87 uses_translate_c: bool = false,
8885};
8986
9087const cases = [_]Case{
......@@ -96,7 +93,6 @@ const cases = [_]Case{
9693 .src_path = "hello_world/hello_libc.zig",
9794 .link_libc = true,
9895 .all_modes = true,
99 .uses_translate_c = true,
10096 },
10197 .{
10298 .src_path = "cat/main.zig",
......@@ -112,10 +108,7 @@ const cases = [_]Case{
112108 .os_tag = .freestanding,
113109 },
114110 },
115 .{
116 .src_path = "issue_12471/main.zig",
117 .uses_translate_c = true,
118 },
111 .{ .src_path = "issue_12471/main.zig" },
119112 .{ .src_path = "guess_number/main.zig" },
120113 .{ .src_path = "main_return_error/error_u8.zig" },
121114 .{ .src_path = "main_return_error/error_u8_non_zero.zig" },