authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-02-23 02:29:02-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-02-23 02:37:11-07:00
logd7ac8c8e6552462d3e5e3b4ebce8a4e2ca93be76
treef7a02320c05d9a8811ac64788c769f2be59b9b4d
parent483b63d301315d6ca2c1c8660f5ec636c7358dc6

wasi: don't try to test http

wasi does not support networking

2 files changed, 7 insertions(+), 4 deletions(-)

lib/std/http.zig+6-3
......@@ -1,5 +1,3 @@
1const std = @import("std.zig");
2
31pub const Client = @import("http/Client.zig");
42pub const Server = @import("http/Server.zig");
53pub const protocol = @import("http/protocol.zig");
......@@ -308,6 +306,9 @@ pub const Header = struct {
308306 value: []const u8,
309307};
310308
309const builtin = @import("builtin");
310const std = @import("std.zig");
311
311312test {
312313 _ = Client;
313314 _ = Method;
......@@ -315,5 +316,7 @@ test {
315316 _ = Status;
316317 _ = HeadParser;
317318 _ = ChunkParser;
318 _ = @import("http/test.zig");
319 if (builtin.os.tag != .wasi) {
320 _ = @import("http/test.zig");
321 }
319322}
lib/std/http/test.zig+1-1
......@@ -914,6 +914,7 @@ const TestServer = struct {
914914
915915 fn destroy(self: *@This()) void {
916916 self.server_thread.join();
917 self.net_server.deinit();
917918 std.testing.allocator.destroy(self);
918919 }
919920
......@@ -924,7 +925,6 @@ const TestServer = struct {
924925
925926fn createTestServer(S: type) !*TestServer {
926927 if (builtin.single_threaded) return error.SkipZigTest;
927 if (builtin.os.tag == .wasi) return error.SkipZigTest;
928928 if (builtin.zig_backend == .stage2_llvm and native_endian == .big) {
929929 // https://github.com/ziglang/zig/issues/13782
930930 return error.SkipZigTest;