authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-01-02 12:21:19-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-01-02 12:21:19-07:00
log44c9bf559bd99899e7858cc37930f91a9de932d2
tree3e957b44df38f429f1927f6bd723579ba54daf17
parent5a6579611f3040015fc788d249de504f54dabfd5

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.

2 files changed, 21 insertions(+), 3 deletions(-)

lib/std/hash/crc.zig+10
...@@ -102,7 +102,11 @@ pub fn Crc32WithPoly(comptime poly: Polynomial) type {...@@ -102,7 +102,11 @@ pub fn Crc32WithPoly(comptime poly: Polynomial) type {
102 };102 };
103}103}
104104
105const please_windows_dont_oom = std.Target.current.os.tag == .windows;
106
105test "crc32 ieee" {107test "crc32 ieee" {
108 if (please_windows_dont_oom) return error.SkipZigTest;
109
106 const Crc32Ieee = Crc32WithPoly(.IEEE);110 const Crc32Ieee = Crc32WithPoly(.IEEE);
107111
108 testing.expect(Crc32Ieee.hash("") == 0x00000000);112 testing.expect(Crc32Ieee.hash("") == 0x00000000);
...@@ -111,6 +115,8 @@ test "crc32 ieee" {...@@ -111,6 +115,8 @@ test "crc32 ieee" {
111}115}
112116
113test "crc32 castagnoli" {117test "crc32 castagnoli" {
118 if (please_windows_dont_oom) return error.SkipZigTest;
119
114 const Crc32Castagnoli = Crc32WithPoly(.Castagnoli);120 const Crc32Castagnoli = Crc32WithPoly(.Castagnoli);
115121
116 testing.expect(Crc32Castagnoli.hash("") == 0x00000000);122 testing.expect(Crc32Castagnoli.hash("") == 0x00000000);
...@@ -167,6 +173,8 @@ pub fn Crc32SmallWithPoly(comptime poly: Polynomial) type {...@@ -167,6 +173,8 @@ pub fn Crc32SmallWithPoly(comptime poly: Polynomial) type {
167}173}
168174
169test "small crc32 ieee" {175test "small crc32 ieee" {
176 if (please_windows_dont_oom) return error.SkipZigTest;
177
170 const Crc32Ieee = Crc32SmallWithPoly(.IEEE);178 const Crc32Ieee = Crc32SmallWithPoly(.IEEE);
171179
172 testing.expect(Crc32Ieee.hash("") == 0x00000000);180 testing.expect(Crc32Ieee.hash("") == 0x00000000);
...@@ -175,6 +183,8 @@ test "small crc32 ieee" {...@@ -175,6 +183,8 @@ test "small crc32 ieee" {
175}183}
176184
177test "small crc32 castagnoli" {185test "small crc32 castagnoli" {
186 if (please_windows_dont_oom) return error.SkipZigTest;
187
178 const Crc32Castagnoli = Crc32SmallWithPoly(.Castagnoli);188 const Crc32Castagnoli = Crc32SmallWithPoly(.Castagnoli);
179189
180 testing.expect(Crc32Castagnoli.hash("") == 0x00000000);190 testing.expect(Crc32Castagnoli.hash("") == 0x00000000);
lib/std/rand/ziggurat.zig+11-3
...@@ -131,7 +131,11 @@ fn norm_zero_case(random: *Random, u: f64) f64 {...@@ -131,7 +131,11 @@ fn norm_zero_case(random: *Random, u: f64) f64 {
131 }131 }
132}132}
133133
134test "ziggurant normal dist sanity" {134const please_windows_dont_oom = std.Target.current.os.tag == .windows;
135
136test "normal dist sanity" {
137 if (please_windows_dont_oom) return error.SkipZigTest;
138
135 var prng = std.rand.DefaultPrng.init(0);139 var prng = std.rand.DefaultPrng.init(0);
136 var i: usize = 0;140 var i: usize = 0;
137 while (i < 1000) : (i += 1) {141 while (i < 1000) : (i += 1) {
...@@ -158,7 +162,9 @@ fn exp_zero_case(random: *Random, _: f64) f64 {...@@ -158,7 +162,9 @@ fn exp_zero_case(random: *Random, _: f64) f64 {
158 return exp_r - math.ln(random.float(f64));162 return exp_r - math.ln(random.float(f64));
159}163}
160164
161test "ziggurant exp dist sanity" {165test "exp dist sanity" {
166 if (please_windows_dont_oom) return error.SkipZigTest;
167
162 var prng = std.rand.DefaultPrng.init(0);168 var prng = std.rand.DefaultPrng.init(0);
163 var i: usize = 0;169 var i: usize = 0;
164 while (i < 1000) : (i += 1) {170 while (i < 1000) : (i += 1) {
...@@ -166,6 +172,8 @@ test "ziggurant exp dist sanity" {...@@ -166,6 +172,8 @@ test "ziggurant exp dist sanity" {
166 }172 }
167}173}
168174
169test "ziggurat table gen" {175test "table gen" {
176 if (please_windows_dont_oom) return error.SkipZigTest;
177
170 const table = NormDist;178 const table = NormDist;
171}179}