| 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,7 +117,7 @@ pub fn build(b: *Builder) !void { |
| 117 | fmt_step.dependOn(&fmt_build_zig.step); | 117 | fmt_step.dependOn(&fmt_build_zig.step); |
| 118 | 118 | ||
| 119 | // TODO for the moment, skip wasm32-wasi until bugs are sorted out. | 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 | 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)); | 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,9 +1,13 @@ |
| 1 | const builtin = @import("builtin"); | ||
| 2 | |||
| 1 | comptime { | 3 | comptime { |
| 2 | _ = @import("behavior/align.zig"); | 4 | _ = @import("behavior/align.zig"); |
| 3 | _ = @import("behavior/alignof.zig"); | 5 | _ = @import("behavior/alignof.zig"); |
| 4 | _ = @import("behavior/array.zig"); | 6 | _ = @import("behavior/array.zig"); |
| 5 | _ = @import("behavior/asm.zig"); | 7 | if (builtin.os.tag != .wasi) { |
| 6 | _ = @import("behavior/async_fn.zig"); | 8 | _ = @import("behavior/asm.zig"); |
| 9 | _ = @import("behavior/async_fn.zig"); | ||
| 10 | } | ||
| 7 | _ = @import("behavior/atomics.zig"); | 11 | _ = @import("behavior/atomics.zig"); |
| 8 | _ = @import("behavior/await_struct.zig"); | 12 | _ = @import("behavior/await_struct.zig"); |
| 9 | _ = @import("behavior/bit_shifting.zig"); | 13 | _ = @import("behavior/bit_shifting.zig"); |
test/stage1/behavior/align.zig+6| ... | @@ -133,6 +133,9 @@ fn alignedBig() align(16) i32 { | ... | @@ -133,6 +133,9 @@ fn alignedBig() align(16) i32 { |
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | test "@alignCast functions" { | 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 | expect(fnExpectsOnly1(simple4) == 0x19); | 139 | expect(fnExpectsOnly1(simple4) == 0x19); |
| 137 | } | 140 | } |
| 138 | fn fnExpectsOnly1(ptr: fn () align(1) i32) i32 { | 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,6 +327,9 @@ test "align(@alignOf(T)) T does not force resolution of T" { |
| 324 | } | 327 | } |
| 325 | 328 | ||
| 326 | test "align(N) on functions" { | 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 | expect((@ptrToInt(overaligned_fn) & (0x1000 - 1)) == 0); | 333 | expect((@ptrToInt(overaligned_fn) & (0x1000 - 1)) == 0); |
| 328 | } | 334 | } |
| 329 | fn overaligned_fn() align(0x1000) i32 { | 335 | fn overaligned_fn() align(0x1000) i32 { |
test/stage1/behavior/shuffle.zig+4| ... | @@ -1,9 +1,13 @@ | ... | @@ -1,9 +1,13 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 2 | const mem = std.mem; | 3 | const mem = std.mem; |
| 3 | const expect = std.testing.expect; | 4 | const expect = std.testing.expect; |
| 4 | const Vector = std.meta.Vector; | 5 | const Vector = std.meta.Vector; |
| 5 | 6 | ||
| 6 | test "@shuffle" { | 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 | const S = struct { | 11 | const S = struct { |
| 8 | fn doTheTest() void { | 12 | fn doTheTest() void { |
| 9 | var v: Vector(4, i32) = [4]i32{ 2147483647, -2, 30, 40 }; | 13 | var v: Vector(4, i32) = [4]i32{ 2147483647, -2, 30, 40 }; |
test/stage1/behavior/vector.zig+4| ... | @@ -1,4 +1,5 @@ | ... | @@ -1,4 +1,5 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 2 | const mem = std.mem; | 3 | const mem = std.mem; |
| 3 | const math = std.math; | 4 | const math = std.math; |
| 4 | const expect = std.testing.expect; | 5 | const expect = std.testing.expect; |
| ... | @@ -387,6 +388,9 @@ test "vector bitwise not operator" { | ... | @@ -387,6 +388,9 @@ test "vector bitwise not operator" { |
| 387 | } | 388 | } |
| 388 | 389 | ||
| 389 | test "vector shift operators" { | 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 | const S = struct { | 394 | const S = struct { |
| 391 | fn doTheTestShift(x: var, y: var) void { | 395 | fn doTheTestShift(x: var, y: var) void { |
| 392 | const N = @typeInfo(@TypeOf(x)).Array.len; | 396 | const N = @typeInfo(@TypeOf(x)).Array.len; |
test/tests.zig-9| ... | @@ -483,15 +483,6 @@ pub fn addPkgTests( | ... | @@ -483,15 +483,6 @@ pub fn addPkgTests( |
| 483 | if (skip_non_native and !test_target.target.isNative()) | 483 | if (skip_non_native and !test_target.target.isNative()) |
| 484 | continue; | 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 | if (skip_libc and test_target.link_libc) | 486 | if (skip_libc and test_target.link_libc) |
| 496 | continue; | 487 | continue; |
| 497 | 488 |