| author | |
| committer | |
| log | 34f84c36082015bb8aacfcfb27cecf44e8e6eb3a |
| tree | eec7aa2f4695e01255714b4583ac67bfe300ed5b |
| parent | 2a59ecd7eca7318e9a66d856b04dd9fa45b2d69d |
6 files changed, 21 insertions(+), 12 deletions(-)
build.zig+1-1| ... | ... | @@ -117,7 +117,7 @@ pub fn build(b: *Builder) !void { |
| 117 | 117 | fmt_step.dependOn(&fmt_build_zig.step); |
| 118 | 118 | |
| 119 | 119 | // TODO for the moment, skip wasm32-wasi until bugs are sorted out. |
| 120 | test_step.dependOn(tests.addPkgTests(b, test_filter, "test/stage1/behavior.zig", "behavior", "Run the behavior tests", modes, false, skip_non_native, skip_libc, is_wine_enabled, is_qemu_enabled, false, glibc_multi_dir)); | |
| 120 | test_step.dependOn(tests.addPkgTests(b, test_filter, "test/stage1/behavior.zig", "behavior", "Run the behavior tests", modes, false, skip_non_native, skip_libc, is_wine_enabled, is_qemu_enabled, is_wasmtime_enabled, glibc_multi_dir)); | |
| 121 | 121 | |
| 122 | 122 | test_step.dependOn(tests.addPkgTests(b, test_filter, "lib/std/std.zig", "std", "Run the standard library tests", modes, false, skip_non_native, skip_libc, is_wine_enabled, is_qemu_enabled, is_wasmtime_enabled, glibc_multi_dir)); |
| 123 | 123 |
test/stage1/behavior.zig+6-2| ... | ... | @@ -1,9 +1,13 @@ |
| 1 | const builtin = @import("builtin"); | |
| 2 | ||
| 1 | 3 | comptime { |
| 2 | 4 | _ = @import("behavior/align.zig"); |
| 3 | 5 | _ = @import("behavior/alignof.zig"); |
| 4 | 6 | _ = @import("behavior/array.zig"); |
| 5 | _ = @import("behavior/asm.zig"); | |
| 6 | _ = @import("behavior/async_fn.zig"); | |
| 7 | if (builtin.os.tag != .wasi) { | |
| 8 | _ = @import("behavior/asm.zig"); | |
| 9 | _ = @import("behavior/async_fn.zig"); | |
| 10 | } | |
| 7 | 11 | _ = @import("behavior/atomics.zig"); |
| 8 | 12 | _ = @import("behavior/await_struct.zig"); |
| 9 | 13 | _ = @import("behavior/bit_shifting.zig"); |
test/stage1/behavior/align.zig+6| ... | ... | @@ -133,6 +133,9 @@ fn alignedBig() align(16) i32 { |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | test "@alignCast functions" { |
| 136 | // TODO investigate why this fails when cross-compiled to wasm. | |
| 137 | if (builtin.os.tag == .wasi) return error.SkipZigTest; | |
| 138 | ||
| 136 | 139 | expect(fnExpectsOnly1(simple4) == 0x19); |
| 137 | 140 | } |
| 138 | 141 | fn fnExpectsOnly1(ptr: fn () align(1) i32) i32 { |
| ... | ... | @@ -324,6 +327,9 @@ test "align(@alignOf(T)) T does not force resolution of T" { |
| 324 | 327 | } |
| 325 | 328 | |
| 326 | 329 | test "align(N) on functions" { |
| 330 | // TODO investigate why this fails when cross-compiled to wasm. | |
| 331 | if (builtin.os.tag == .wasi) return error.SkipZigTest; | |
| 332 | ||
| 327 | 333 | expect((@ptrToInt(overaligned_fn) & (0x1000 - 1)) == 0); |
| 328 | 334 | } |
| 329 | 335 | fn overaligned_fn() align(0x1000) i32 { |
test/stage1/behavior/shuffle.zig+4| ... | ... | @@ -1,9 +1,13 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | |
| 2 | 3 | const mem = std.mem; |
| 3 | 4 | const expect = std.testing.expect; |
| 4 | 5 | const Vector = std.meta.Vector; |
| 5 | 6 | |
| 6 | 7 | test "@shuffle" { |
| 8 | // TODO investigate why this fails when cross-compiling to wasm. | |
| 9 | if (builtin.os.tag == .wasi) return error.SkipZigTest; | |
| 10 | ||
| 7 | 11 | const S = struct { |
| 8 | 12 | fn doTheTest() void { |
| 9 | 13 | var v: Vector(4, i32) = [4]i32{ 2147483647, -2, 30, 40 }; |
test/stage1/behavior/vector.zig+4| ... | ... | @@ -1,4 +1,5 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | |
| 2 | 3 | const mem = std.mem; |
| 3 | 4 | const math = std.math; |
| 4 | 5 | const expect = std.testing.expect; |
| ... | ... | @@ -387,6 +388,9 @@ test "vector bitwise not operator" { |
| 387 | 388 | } |
| 388 | 389 | |
| 389 | 390 | test "vector shift operators" { |
| 391 | // TODO investigate why this fails when cross-compiled to wasm. | |
| 392 | if (builtin.os.tag == .wasi) return error.SkipZigTest; | |
| 393 | ||
| 390 | 394 | const S = struct { |
| 391 | 395 | fn doTheTestShift(x: var, y: var) void { |
| 392 | 396 | const N = @typeInfo(@TypeOf(x)).Array.len; |
test/tests.zig-9| ... | ... | @@ -483,15 +483,6 @@ pub fn addPkgTests( |
| 483 | 483 | if (skip_non_native and !test_target.target.isNative()) |
| 484 | 484 | continue; |
| 485 | 485 | |
| 486 | if (!is_wasmtime_enabled) { | |
| 487 | if (test_target.target.os_tag) |tag| { | |
| 488 | if (tag == .wasi) { | |
| 489 | warn("Skipping {} on wasm32-wasi.\n", .{root_src}); | |
| 490 | continue; | |
| 491 | } | |
| 492 | } | |
| 493 | } | |
| 494 | ||
| 495 | 486 | if (skip_libc and test_target.link_libc) |
| 496 | 487 | continue; |
| 497 | 488 |