Commit 44c9bf559b

Andrew Kelley <andrew@ziglang.org>
2021-01-02 20:21:19
std: disable a couple tests on windows
They are passing but we're hitting OOM on the Windows CI server. This is to buy us more time until stage2 rescues us from the CI memory crisis.
1 parent 5a65796
Changed files (2)
lib
std
lib/std/hash/crc.zig
@@ -102,7 +102,11 @@ pub fn Crc32WithPoly(comptime poly: Polynomial) type {
     };
 }
 
+const please_windows_dont_oom = std.Target.current.os.tag == .windows;
+
 test "crc32 ieee" {
+    if (please_windows_dont_oom) return error.SkipZigTest;
+
     const Crc32Ieee = Crc32WithPoly(.IEEE);
 
     testing.expect(Crc32Ieee.hash("") == 0x00000000);
@@ -111,6 +115,8 @@ test "crc32 ieee" {
 }
 
 test "crc32 castagnoli" {
+    if (please_windows_dont_oom) return error.SkipZigTest;
+
     const Crc32Castagnoli = Crc32WithPoly(.Castagnoli);
 
     testing.expect(Crc32Castagnoli.hash("") == 0x00000000);
@@ -167,6 +173,8 @@ pub fn Crc32SmallWithPoly(comptime poly: Polynomial) type {
 }
 
 test "small crc32 ieee" {
+    if (please_windows_dont_oom) return error.SkipZigTest;
+
     const Crc32Ieee = Crc32SmallWithPoly(.IEEE);
 
     testing.expect(Crc32Ieee.hash("") == 0x00000000);
@@ -175,6 +183,8 @@ test "small crc32 ieee" {
 }
 
 test "small crc32 castagnoli" {
+    if (please_windows_dont_oom) return error.SkipZigTest;
+
     const Crc32Castagnoli = Crc32SmallWithPoly(.Castagnoli);
 
     testing.expect(Crc32Castagnoli.hash("") == 0x00000000);
lib/std/rand/ziggurat.zig
@@ -131,7 +131,11 @@ fn norm_zero_case(random: *Random, u: f64) f64 {
     }
 }
 
-test "ziggurant normal dist sanity" {
+const please_windows_dont_oom = std.Target.current.os.tag == .windows;
+
+test "normal dist sanity" {
+    if (please_windows_dont_oom) return error.SkipZigTest;
+
     var prng = std.rand.DefaultPrng.init(0);
     var i: usize = 0;
     while (i < 1000) : (i += 1) {
@@ -158,7 +162,9 @@ fn exp_zero_case(random: *Random, _: f64) f64 {
     return exp_r - math.ln(random.float(f64));
 }
 
-test "ziggurant exp dist sanity" {
+test "exp dist sanity" {
+    if (please_windows_dont_oom) return error.SkipZigTest;
+
     var prng = std.rand.DefaultPrng.init(0);
     var i: usize = 0;
     while (i < 1000) : (i += 1) {
@@ -166,6 +172,8 @@ test "ziggurant exp dist sanity" {
     }
 }
 
-test "ziggurat table gen" {
+test "table gen" {
+    if (please_windows_dont_oom) return error.SkipZigTest;
+
     const table = NormDist;
 }