diff options
| author | Takeshi Yoneda <takeshi@tetrate.io> | 2021-07-27 08:59:34 +0900 |
|---|---|---|
| committer | Takeshi Yoneda <takeshi@tetrate.io> | 2021-07-27 09:01:00 +0900 |
| commit | 1e20a62126e66d0306a6db01b3a2ffd6b946b9b6 (patch) | |
| tree | f324d0497c78a25144c06f4e2a9c69a2e3a5a658 /lib/std/testing.zig | |
| parent | fc105f268149b195ea4a4189da59d40e96e455b4 (diff) | |
| download | zig-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.zig | 4 |
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 |
