Skip to content

Commit 44c9bf5

Browse files
committed
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 commit 44c9bf5

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

lib/std/hash/crc.zig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,11 @@ pub fn Crc32WithPoly(comptime poly: Polynomial) type {
102102
};
103103
}
104104

105+
const please_windows_dont_oom = std.Target.current.os.tag == .windows;
106+
105107
test "crc32 ieee" {
108+
if (please_windows_dont_oom) return error.SkipZigTest;
109+
106110
const Crc32Ieee = Crc32WithPoly(.IEEE);
107111

108112
testing.expect(Crc32Ieee.hash("") == 0x00000000);
@@ -111,6 +115,8 @@ test "crc32 ieee" {
111115
}
112116

113117
test "crc32 castagnoli" {
118+
if (please_windows_dont_oom) return error.SkipZigTest;
119+
114120
const Crc32Castagnoli = Crc32WithPoly(.Castagnoli);
115121

116122
testing.expect(Crc32Castagnoli.hash("") == 0x00000000);
@@ -167,6 +173,8 @@ pub fn Crc32SmallWithPoly(comptime poly: Polynomial) type {
167173
}
168174

169175
test "small crc32 ieee" {
176+
if (please_windows_dont_oom) return error.SkipZigTest;
177+
170178
const Crc32Ieee = Crc32SmallWithPoly(.IEEE);
171179

172180
testing.expect(Crc32Ieee.hash("") == 0x00000000);
@@ -175,6 +183,8 @@ test "small crc32 ieee" {
175183
}
176184

177185
test "small crc32 castagnoli" {
186+
if (please_windows_dont_oom) return error.SkipZigTest;
187+
178188
const Crc32Castagnoli = Crc32SmallWithPoly(.Castagnoli);
179189

180190
testing.expect(Crc32Castagnoli.hash("") == 0x00000000);

lib/std/rand/ziggurat.zig

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,11 @@ fn norm_zero_case(random: *Random, u: f64) f64 {
131131
}
132132
}
133133

134-
test "ziggurant normal dist sanity" {
134+
const please_windows_dont_oom = std.Target.current.os.tag == .windows;
135+
136+
test "normal dist sanity" {
137+
if (please_windows_dont_oom) return error.SkipZigTest;
138+
135139
var prng = std.rand.DefaultPrng.init(0);
136140
var i: usize = 0;
137141
while (i < 1000) : (i += 1) {
@@ -158,14 +162,18 @@ fn exp_zero_case(random: *Random, _: f64) f64 {
158162
return exp_r - math.ln(random.float(f64));
159163
}
160164

161-
test "ziggurant exp dist sanity" {
165+
test "exp dist sanity" {
166+
if (please_windows_dont_oom) return error.SkipZigTest;
167+
162168
var prng = std.rand.DefaultPrng.init(0);
163169
var i: usize = 0;
164170
while (i < 1000) : (i += 1) {
165171
_ = prng.random.floatExp(f64);
166172
}
167173
}
168174

169-
test "ziggurat table gen" {
175+
test "table gen" {
176+
if (please_windows_dont_oom) return error.SkipZigTest;
177+
170178
const table = NormDist;
171179
}

0 commit comments

Comments
 (0)