authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-06-03 15:30:25+03:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-06-03 20:21:20+03:00
log1a7b4ddeaedb81255cfa8907958c3cf09dd340ee
tree69b09bdcf3405c057983c8e9dece8d4b66edcc87
parent2b93546b39a85e9316c2bf12f336c357577114fa

std: disable tests that crash stage2


6 files changed, 12 insertions(+), 1 deletions(-)

lib/std/compress.zig+1
...@@ -5,6 +5,7 @@ pub const gzip = @import("compress/gzip.zig");...@@ -5,6 +5,7 @@ pub const gzip = @import("compress/gzip.zig");
5pub const zlib = @import("compress/zlib.zig");5pub const zlib = @import("compress/zlib.zig");
66
7test {7test {
8 if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest;
8 _ = deflate;9 _ = deflate;
9 _ = gzip;10 _ = gzip;
10 _ = zlib;11 _ = zlib;
lib/std/event/batch.zig+1
...@@ -109,6 +109,7 @@ pub fn Batch(...@@ -109,6 +109,7 @@ pub fn Batch(
109}109}
110110
111test "std.event.Batch" {111test "std.event.Batch" {
112 if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest;
112 var count: usize = 0;113 var count: usize = 0;
113 var batch = Batch(void, 2, .auto_async).init();114 var batch = Batch(void, 2, .auto_async).init();
114 batch.add(&async sleepALittle(&count));115 batch.add(&async sleepALittle(&count));
lib/std/fmt.zig+4
...@@ -2111,6 +2111,7 @@ test "slice" {...@@ -2111,6 +2111,7 @@ test "slice" {
2111}2111}
21122112
2113test "escape non-printable" {2113test "escape non-printable" {
2114 if (builtin.zig_backend != .stage1) return error.SkipZigTest;
2114 try expectFmt("abc", "{s}", .{fmtSliceEscapeLower("abc")});2115 try expectFmt("abc", "{s}", .{fmtSliceEscapeLower("abc")});
2115 try expectFmt("ab\\xffc", "{s}", .{fmtSliceEscapeLower("ab\xffc")});2116 try expectFmt("ab\\xffc", "{s}", .{fmtSliceEscapeLower("ab\xffc")});
2116 try expectFmt("ab\\xFFc", "{s}", .{fmtSliceEscapeUpper("ab\xffc")});2117 try expectFmt("ab\\xFFc", "{s}", .{fmtSliceEscapeUpper("ab\xffc")});
...@@ -2146,6 +2147,7 @@ test "cstr" {...@@ -2146,6 +2147,7 @@ test "cstr" {
2146}2147}
21472148
2148test "filesize" {2149test "filesize" {
2150 if (builtin.zig_backend != .stage1) return error.SkipZigTest;
2149 try expectFmt("file size: 42B\n", "file size: {}\n", .{fmtIntSizeDec(42)});2151 try expectFmt("file size: 42B\n", "file size: {}\n", .{fmtIntSizeDec(42)});
2150 try expectFmt("file size: 42B\n", "file size: {}\n", .{fmtIntSizeBin(42)});2152 try expectFmt("file size: 42B\n", "file size: {}\n", .{fmtIntSizeBin(42)});
2151 try expectFmt("file size: 63MB\n", "file size: {}\n", .{fmtIntSizeDec(63 * 1000 * 1000)});2153 try expectFmt("file size: 63MB\n", "file size: {}\n", .{fmtIntSizeDec(63 * 1000 * 1000)});
...@@ -2445,6 +2447,7 @@ test "struct.zero-size" {...@@ -2445,6 +2447,7 @@ test "struct.zero-size" {
2445}2447}
24462448
2447test "bytes.hex" {2449test "bytes.hex" {
2450 if (builtin.zig_backend != .stage1) return error.SkipZigTest;
2448 const some_bytes = "\xCA\xFE\xBA\xBE";2451 const some_bytes = "\xCA\xFE\xBA\xBE";
2449 try expectFmt("lowercase: cafebabe\n", "lowercase: {x}\n", .{fmtSliceHexLower(some_bytes)});2452 try expectFmt("lowercase: cafebabe\n", "lowercase: {x}\n", .{fmtSliceHexLower(some_bytes)});
2450 try expectFmt("uppercase: CAFEBABE\n", "uppercase: {X}\n", .{fmtSliceHexUpper(some_bytes)});2453 try expectFmt("uppercase: CAFEBABE\n", "uppercase: {X}\n", .{fmtSliceHexUpper(some_bytes)});
...@@ -2476,6 +2479,7 @@ pub fn hexToBytes(out: []u8, input: []const u8) ![]u8 {...@@ -2476,6 +2479,7 @@ pub fn hexToBytes(out: []u8, input: []const u8) ![]u8 {
2476}2479}
24772480
2478test "hexToBytes" {2481test "hexToBytes" {
2482 if (builtin.zig_backend != .stage1) return error.SkipZigTest;
2479 var buf: [32]u8 = undefined;2483 var buf: [32]u8 = undefined;
2480 try expectFmt("90" ** 32, "{s}", .{fmtSliceHexUpper(try hexToBytes(&buf, "90" ** 32))});2484 try expectFmt("90" ** 32, "{s}", .{fmtSliceHexUpper(try hexToBytes(&buf, "90" ** 32))});
2481 try expectFmt("ABCD", "{s}", .{fmtSliceHexUpper(try hexToBytes(&buf, "ABCD"))});2485 try expectFmt("ABCD", "{s}", .{fmtSliceHexUpper(try hexToBytes(&buf, "ABCD"))});
lib/std/segmented_list.zig+4-1
...@@ -391,7 +391,10 @@ pub fn SegmentedList(comptime T: type, comptime prealloc_item_count: usize) type...@@ -391,7 +391,10 @@ pub fn SegmentedList(comptime T: type, comptime prealloc_item_count: usize) type
391}391}
392392
393test "SegmentedList basic usage" {393test "SegmentedList basic usage" {
394 try testSegmentedList(0);394 if (@import("builtin").zig_backend == .stage1) {
395 // https://github.com/ziglang/zig/issues/11787
396 try testSegmentedList(0);
397 }
395 try testSegmentedList(1);398 try testSegmentedList(1);
396 try testSegmentedList(2);399 try testSegmentedList(2);
397 try testSegmentedList(4);400 try testSegmentedList(4);
lib/std/unicode.zig+1
...@@ -804,6 +804,7 @@ pub fn fmtUtf16le(utf16le: []const u16) std.fmt.Formatter(formatUtf16le) {...@@ -804,6 +804,7 @@ pub fn fmtUtf16le(utf16le: []const u16) std.fmt.Formatter(formatUtf16le) {
804}804}
805805
806test "fmtUtf16le" {806test "fmtUtf16le" {
807 if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest;
807 const expectFmt = std.testing.expectFmt;808 const expectFmt = std.testing.expectFmt;
808 try expectFmt("", "{}", .{fmtUtf16le(utf8ToUtf16LeStringLiteral(""))});809 try expectFmt("", "{}", .{fmtUtf16le(utf8ToUtf16LeStringLiteral(""))});
809 try expectFmt("foo", "{}", .{fmtUtf16le(utf8ToUtf16LeStringLiteral("foo"))});810 try expectFmt("foo", "{}", .{fmtUtf16le(utf8ToUtf16LeStringLiteral("foo"))});
lib/std/x.zig+1
...@@ -13,6 +13,7 @@ pub const net = struct {...@@ -13,6 +13,7 @@ pub const net = struct {
13};13};
1414
15test {15test {
16 if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest;
16 inline for (.{ os, net }) |module| {17 inline for (.{ os, net }) |module| {
17 std.testing.refAllDecls(module);18 std.testing.refAllDecls(module);
18 }19 }