diff --git a/ci/aarch64-macos-debug.sh b/ci/aarch64-macos-debug.sh index 9592a825deec501c610d7da882635cf686fd932a..dd959ef0c97d306d3f79a40d61d0eba87ae5c268 100755 --- a/ci/aarch64-macos-debug.sh +++ b/ci/aarch64-macos-debug.sh @@ -48,7 +48,13 @@ stage3-debug/bin/zig build test docs \ --zig-lib-dir "$PWD/../lib" \ -Denable-macos-sdk \ -Dstatic-llvm \ - -Dskip-non-native \ + -Dskip-spirv \ + -Dskip-wasm \ + -Dskip-linux \ + -Dskip-freebsd \ + -Dskip-netbsd \ + -Dskip-openbsd \ + -Dskip-windows \ --search-prefix "$PREFIX" \ --test-timeout 2m diff --git a/ci/aarch64-macos-release.sh b/ci/aarch64-macos-release.sh index 4a6353a2e038dcc820aa6ebad53a13e408d8fd8c..f358713326c766bcbcbd77583933e6683f1a0fee 100755 --- a/ci/aarch64-macos-release.sh +++ b/ci/aarch64-macos-release.sh @@ -47,7 +47,13 @@ stage3-release/bin/zig build test docs \ --zig-lib-dir "$PWD/../lib" \ -Denable-macos-sdk \ -Dstatic-llvm \ - -Dskip-non-native \ + -Dskip-spirv \ + -Dskip-wasm \ + -Dskip-linux \ + -Dskip-freebsd \ + -Dskip-netbsd \ + -Dskip-openbsd \ + -Dskip-windows \ --search-prefix "$PREFIX" \ --test-timeout 2m diff --git a/lib/std/math/acos.zig b/lib/std/math/acos.zig index f96c3fffb5a72c0e33b04152d059afe029e7a75c..21b1f1b88963d6c1d0c2ac8fe4c0651430e43019 100644 --- a/lib/std/math/acos.zig +++ b/lib/std/math/acos.zig @@ -337,6 +337,8 @@ fn acosBinary128(x: f128) f128 { } test "acosBinary16.special" { + if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest; + try testing.expectApproxEqAbs(0x1.92p0, acosBinary16(0x0p+0), math.floatEpsAt(f16, 0x1.92p0)); try testing.expectApproxEqAbs(0x1.92p1, acosBinary16(-0x1p+0), math.floatEpsAt(f16, 0x1.92p1)); try testing.expectEqual(0x0p+0, acosBinary16(0x1p+0)); @@ -348,6 +350,8 @@ test "acosBinary16.special" { } test "acosBinary16" { + if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest; + try testing.expectApproxEqAbs(0x1.834p0, acosBinary16(0x1.db4p-5), math.floatEpsAt(f16, 0x1.834p0)); try testing.expectApproxEqAbs(0x1.d48p0, acosBinary16(-0x1.068p-2), math.floatEpsAt(f16, 0x1.d48p0)); try testing.expectApproxEqAbs(0x1.b7cp0, acosBinary16(-0x1.2c4p-3), math.floatEpsAt(f16, 0x1.b7cp0)); diff --git a/lib/std/math/asin.zig b/lib/std/math/asin.zig index 7c5eb68d014d27ea72ef991fb8f84ed64c474c2e..1248e7245991290e151afbab6b04424d08306019 100644 --- a/lib/std/math/asin.zig +++ b/lib/std/math/asin.zig @@ -326,6 +326,8 @@ fn asinBinary128(x: f128) f128 { } test "asinBinary16.special" { + if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest; + try testing.expectApproxEqAbs(0x1.92p0, asinBinary16(0x1p+0), math.floatEpsAt(f16, 0x1.92p0)); try testing.expectApproxEqAbs(-0x1.92p0, asinBinary16(-0x1p+0), math.floatEpsAt(f16, -0x1.92p0)); try testing.expectEqual(0x0p+0, asinBinary16(0x0p+0)); @@ -338,6 +340,8 @@ test "asinBinary16.special" { } test "asinBinary16" { + if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest; + try testing.expectApproxEqAbs(-0x1.e4cp-6, asinBinary16(-0x1.e4cp-6), math.floatEpsAt(f16, -0x1.e4cp-6)); try testing.expectApproxEqAbs(0x1.2a8p0, asinBinary16(0x1.d68p-1), math.floatEpsAt(f16, 0x1.2a8p0)); try testing.expectApproxEqAbs(-0x1.eep-1, asinBinary16(-0x1.a4cp-1), math.floatEpsAt(f16, -0x1.eep-1)); diff --git a/lib/std/math/atan.zig b/lib/std/math/atan.zig index ccb46e7afed44e33ca1c88da1aed7830f05e51d0..2d55b8bc1343d95f6671a96636d55b2b4a269c8e 100644 --- a/lib/std/math/atan.zig +++ b/lib/std/math/atan.zig @@ -11,6 +11,7 @@ // https://github.com/ARM-software/optimized-routines/blob/master/math/aarch64/advsimd/atanf.c // https://github.com/ARM-software/optimized-routines/blob/master/math/aarch64/advsimd/atan.c +const builtin = @import("builtin"); const std = @import("../std.zig"); const math = std.math; const mem = std.mem; @@ -480,6 +481,8 @@ fn atanBinary128(x: f128) f128 { } test "atanBinary16.special" { + if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest; + try testing.expectEqual(0x0p+0, atanBinary16(0x0p+0)); try testing.expectEqual(-0x0p+0, atanBinary16(-0x0p+0)); try testing.expectApproxEqAbs(0x1.92p-1, atanBinary16(0x1p+0), math.floatEpsAt(f16, 0x1.92p-1)); @@ -490,6 +493,8 @@ test "atanBinary16.special" { } test "atanBinary16" { + if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest; + try testing.expectApproxEqAbs(-0x1.74cp-2, atanBinary16(-0x1.864p-2), math.floatEpsAt(f16, -0x1.74cp-2)); try testing.expectApproxEqAbs(-0x1.374p0, atanBinary16(-0x1.59cp1), math.floatEpsAt(f16, -0x1.374p0)); try testing.expectApproxEqAbs(-0x1.11cp0, atanBinary16(-0x1.d2cp0), math.floatEpsAt(f16, -0x1.11cp0)); diff --git a/lib/std/math/hypot.zig b/lib/std/math/hypot.zig index 40a9518cf49dcbb207af382e0083c8dc2fb2b919..f661e56d4ce9e46d51cce9487e783c4df78bed9c 100644 --- a/lib/std/math/hypot.zig +++ b/lib/std/math/hypot.zig @@ -98,7 +98,9 @@ test hypot { } test "hypot.correct" { + if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest; if (builtin.cpu.arch.isPowerPC() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/171869 + inline for (.{ f16, f32, f64, f128 }) |T| { inline for (hypot_test_cases) |v| { const a: T, const b: T, const c: T = v; @@ -108,7 +110,9 @@ test "hypot.correct" { } test "hypot.precise" { + if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest; if (builtin.cpu.arch.isPowerPC() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/171869 + inline for (.{ f16, f32, f64 }) |T| { // f128 seems to be 5 ulp inline for (hypot_test_cases) |v| { const a: T, const b: T, const c: T = v; diff --git a/test/behavior/cast.zig b/test/behavior/cast.zig index cfe0b17c56134b33c981382783ac261312c6afc7..2988f4479e688bb61010d9b930546c86a0731001 100644 --- a/test/behavior/cast.zig +++ b/test/behavior/cast.zig @@ -1722,6 +1722,7 @@ test "cast f16 to wider types" { if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; if (builtin.zig_backend == .stage2_c and builtin.cpu.arch.isArm()) return error.SkipZigTest; if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; + if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest; const S = struct { fn doTheTest() !void { diff --git a/test/behavior/vector.zig b/test/behavior/vector.zig index 777730345e1706bef33244a5c8be8e2164d2ac73..f20d083dea7e39a0738e9a48b0aa239e5d99b07f 100644 --- a/test/behavior/vector.zig +++ b/test/behavior/vector.zig @@ -278,6 +278,7 @@ test "array to vector with element type coercion" { if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; + if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest; const S = struct { fn doTheTest() !void { diff --git a/test/behavior/widening.zig b/test/behavior/widening.zig index 62489c5cd72c6bf2261934355249e2d996264923..48d0a7407ca126454a9bf12ff7e00fae7bc0a93e 100644 --- a/test/behavior/widening.zig +++ b/test/behavior/widening.zig @@ -42,6 +42,7 @@ test "float widening" { if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; + if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest; var a: f16 = 12.34; var b: f32 = a; diff --git a/test/tests.zig b/test/tests.zig index 279271af97c407d5ad8ded27a74223d9107489de..2922b8c89928cf4e856c00cd5beddd4997721138 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -2722,6 +2722,10 @@ fn addOneModuleTest( // Don't run spirv binaries _ = these_tests.getEmittedBin(); step.dependOn(&these_tests.step); + } else if (target.cpu.arch == .x86_64 and target.os.tag.isDarwin()) { + // https://codeberg.org/ziglang/zig/issues/35267 + _ = these_tests.getEmittedBin(); + step.dependOn(&these_tests.step); } else { const run = b.addRunArtifact(these_tests); run.skip_foreign_checks = true;