aboutsummaryrefslogtreecommitdiff
path: root/lib/std/testing.zig
diff options
context:
space:
mode:
authorTakeshi Yoneda <takeshi@tetrate.io>2021-07-27 08:59:34 +0900
committerTakeshi Yoneda <takeshi@tetrate.io>2021-07-27 09:01:00 +0900
commit1e20a62126e66d0306a6db01b3a2ffd6b946b9b6 (patch)
treef324d0497c78a25144c06f4e2a9c69a2e3a5a658 /lib/std/testing.zig
parentfc105f268149b195ea4a4189da59d40e96e455b4 (diff)
downloadzig-1e20a62126e66d0306a6db01b3a2ffd6b946b9b6.tar.gz
zig-1e20a62126e66d0306a6db01b3a2ffd6b946b9b6.zip
WASI,libc: enable tests.
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
Diffstat (limited to 'lib/std/testing.zig')
-rw-r--r--lib/std/testing.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/std/testing.zig b/lib/std/testing.zig
index a370c21c29..fbf089a97e 100644
--- a/lib/std/testing.zig
+++ b/lib/std/testing.zig
@@ -4,6 +4,8 @@
// The MIT license requires this copyright notice to be included in all copies
// and substantial portions of the software.
const std = @import("std.zig");
+const builtin = @import("builtin");
+
const math = std.math;
const print = std.debug.print;
@@ -326,7 +328,7 @@ pub const TmpDir = struct {
};
fn getCwdOrWasiPreopen() std.fs.Dir {
- if (std.builtin.os.tag == .wasi) {
+ if (std.builtin.os.tag == .wasi and !builtin.link_libc) {
var preopens = std.fs.wasi.PreopenList.init(allocator);
defer preopens.deinit();
preopens.populate() catch