authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-09-30 12:35:09-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-09-30 12:37:00-07:00
log718a659773776de47e8ce6ba80da663539572056
tree8926f6b2fa2852af444f01682bb2012c4fce5ad8
parentfe117d9961c3622fda5c359733d01de686509af0

std: skip some tests that stage1 leaks too much memory with

We can restore these when we have self-hosted available. This is intended to address #6467

1 files changed, 15 insertions(+), 0 deletions(-)

lib/std/packed_int_array.zig+15
......@@ -318,9 +318,12 @@ pub fn PackedIntSliceEndian(comptime Int: type, comptime endian: builtin.Endian)
318318 };
319319}
320320
321const we_are_testing_this_with_stage1_which_leaks_comptime_memory = true;
322
321323test "PackedIntArray" {
322324 // TODO @setEvalBranchQuota generates panics in wasm32. Investigate.
323325 if (builtin.arch == .wasm32) return error.SkipZigTest;
326 if (we_are_testing_this_with_stage1_which_leaks_comptime_memory) return error.SkipZigTest;
324327
325328 @setEvalBranchQuota(10000);
326329 const max_bits = 256;
......@@ -358,6 +361,7 @@ test "PackedIntArray" {
358361}
359362
360363test "PackedIntArray init" {
364 if (we_are_testing_this_with_stage1_which_leaks_comptime_memory) return error.SkipZigTest;
361365 const PackedArray = PackedIntArray(u3, 8);
362366 var packed_array = PackedArray.init([_]u3{ 0, 1, 2, 3, 4, 5, 6, 7 });
363367 var i = @as(usize, 0);
......@@ -367,6 +371,7 @@ test "PackedIntArray init" {
367371test "PackedIntSlice" {
368372 // TODO @setEvalBranchQuota generates panics in wasm32. Investigate.
369373 if (builtin.arch == .wasm32) return error.SkipZigTest;
374 if (we_are_testing_this_with_stage1_which_leaks_comptime_memory) return error.SkipZigTest;
370375
371376 @setEvalBranchQuota(10000);
372377 const max_bits = 256;
......@@ -405,6 +410,7 @@ test "PackedIntSlice" {
405410}
406411
407412test "PackedIntSlice of PackedInt(Array/Slice)" {
413 if (we_are_testing_this_with_stage1_which_leaks_comptime_memory) return error.SkipZigTest;
408414 const max_bits = 16;
409415 const int_count = 19;
410416
......@@ -470,6 +476,7 @@ test "PackedIntSlice of PackedInt(Array/Slice)" {
470476}
471477
472478test "PackedIntSlice accumulating bit offsets" {
479 if (we_are_testing_this_with_stage1_which_leaks_comptime_memory) return error.SkipZigTest;
473480 //bit_offset is u3, so standard debugging asserts should catch
474481 // anything
475482 {
......@@ -497,6 +504,8 @@ test "PackedIntSlice accumulating bit offsets" {
497504//@NOTE: As I do not have a big endian system to test this on,
498505// big endian values were not tested
499506test "PackedInt(Array/Slice) sliceCast" {
507 if (we_are_testing_this_with_stage1_which_leaks_comptime_memory) return error.SkipZigTest;
508
500509 const PackedArray = PackedIntArray(u1, 16);
501510 var packed_array = PackedArray.init([_]u1{ 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 });
502511 const packed_slice_cast_2 = packed_array.sliceCast(u2);
......@@ -537,6 +546,8 @@ test "PackedInt(Array/Slice) sliceCast" {
537546}
538547
539548test "PackedInt(Array/Slice)Endian" {
549 if (we_are_testing_this_with_stage1_which_leaks_comptime_memory) return error.SkipZigTest;
550
540551 {
541552 const PackedArrayBe = PackedIntArrayEndian(u4, .Big, 8);
542553 var packed_array_be = PackedArrayBe.init([_]u4{ 0, 1, 2, 3, 4, 5, 6, 7 });
......@@ -604,6 +615,8 @@ test "PackedInt(Array/Slice)Endian" {
604615// after this one is not mapped and will cause a segfault if we
605616// don't account for the bounds.
606617test "PackedIntArray at end of available memory" {
618 if (we_are_testing_this_with_stage1_which_leaks_comptime_memory) return error.SkipZigTest;
619
607620 switch (builtin.os.tag) {
608621 .linux, .macosx, .ios, .freebsd, .netbsd, .windows => {},
609622 else => return,
......@@ -623,6 +636,8 @@ test "PackedIntArray at end of available memory" {
623636}
624637
625638test "PackedIntSlice at end of available memory" {
639 if (we_are_testing_this_with_stage1_which_leaks_comptime_memory) return error.SkipZigTest;
640
626641 switch (builtin.os.tag) {
627642 .linux, .macosx, .ios, .freebsd, .netbsd, .windows => {},
628643 else => return,