| author | |
| committer | |
| log | 40812063cca77a84c58c8760ddf0ad9da3356962 |
| tree | 2c48d7c29b0b58a02e4abd3aae4d171aa5e94b8e |
| parent | bd9a616586dba45e2e1788e4f0b9ce6953c36d1d |
8 files changed, 14 insertions(+), 14 deletions(-)
build.zig+4-4| ... | ... | @@ -60,7 +60,6 @@ pub fn build(b: *Builder) !void { |
| 60 | 60 | const skip_release_safe = b.option(bool, "skip-release-safe", "Main test suite skips release-safe builds") orelse skip_release; |
| 61 | 61 | const skip_non_native = b.option(bool, "skip-non-native", "Main test suite skips non-native builds") orelse false; |
| 62 | 62 | const skip_libc = b.option(bool, "skip-libc", "Main test suite skips tests that link libc") orelse false; |
| 63 | const skip_wasi = b.option(bool, "skip-wasi", "Main test suite skips WASI build") orelse false; | |
| 64 | 63 | |
| 65 | 64 | const only_install_lib_files = b.option(bool, "lib-files-only", "Only install library files") orelse false; |
| 66 | 65 | const enable_llvm = b.option(bool, "enable-llvm", "Build self-hosted compiler with LLVM backend enabled") orelse false; |
| ... | ... | @@ -87,6 +86,7 @@ pub fn build(b: *Builder) !void { |
| 87 | 86 | |
| 88 | 87 | const is_wine_enabled = b.option(bool, "enable-wine", "Use Wine to run cross compiled Windows tests") orelse false; |
| 89 | 88 | const is_qemu_enabled = b.option(bool, "enable-qemu", "Use QEMU to run cross compiled foreign architecture tests") orelse false; |
| 89 | const is_wasmtime_enabled = b.option(bool, "enable-wasmtime", "Use Wasmtime to enable and run WASI libstd tests") orelse false; | |
| 90 | 90 | const glibc_multi_dir = b.option([]const u8, "enable-foreign-glibc", "Provide directory with glibc installations to run cross compiled tests that link glibc"); |
| 91 | 91 | |
| 92 | 92 | const test_stage2_step = b.step("test-stage2", "Run the stage2 compiler tests"); |
| ... | ... | @@ -117,11 +117,11 @@ 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, true, is_wine_enabled, is_qemu_enabled, 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, false, 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, skip_wasi, is_wine_enabled, is_qemu_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 | |
| 124 | test_step.dependOn(tests.addPkgTests(b, test_filter, "lib/std/special/compiler_rt.zig", "compiler-rt", "Run the compiler_rt tests", modes, true, skip_non_native, true, skip_wasi, is_wine_enabled, is_qemu_enabled, glibc_multi_dir)); | |
| 124 | test_step.dependOn(tests.addPkgTests(b, test_filter, "lib/std/special/compiler_rt.zig", "compiler-rt", "Run the compiler_rt tests", modes, true, skip_non_native, true, is_wine_enabled, is_qemu_enabled, is_wasmtime_enabled, glibc_multi_dir)); | |
| 125 | 125 | |
| 126 | 126 | test_step.dependOn(tests.addCompareOutputTests(b, test_filter, modes)); |
| 127 | 127 | test_step.dependOn(tests.addStandaloneTests(b, test_filter, modes)); |
ci/azure/linux_script+1-1| ... | ... | @@ -50,7 +50,7 @@ mkdir build |
| 50 | 50 | cd build |
| 51 | 51 | cmake .. -DCMAKE_BUILD_TYPE=Release |
| 52 | 52 | make -j$(nproc) install |
| 53 | ./zig build test -Denable-qemu | |
| 53 | ./zig build test -Denable-qemu -Denable-wasmtime | |
| 54 | 54 | VERSION="$(./zig version)" |
| 55 | 55 | |
| 56 | 56 | if [ "${BUILD_REASON}" != "PullRequest" ]; then |
ci/azure/macos_script+1-1| ... | ... | @@ -88,7 +88,7 @@ mkdir build |
| 88 | 88 | cd build |
| 89 | 89 | cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_INSTALL_PREFIX=$(pwd)/release -DZIG_STATIC=ON |
| 90 | 90 | make $JOBS install |
| 91 | release/bin/zig build test -Dskip-wasi | |
| 91 | release/bin/zig build test | |
| 92 | 92 | |
| 93 | 93 | if [ "${BUILD_REASON}" != "PullRequest" ]; then |
| 94 | 94 | mv ../LICENSE release/ |
ci/azure/windows_mingw_script+1-1| ... | ... | @@ -18,4 +18,4 @@ cmake .. -G 'MSYS Makefiles' -DCMAKE_BUILD_TYPE=RelWithDebInfo $CMAKEFLAGS -DCMA |
| 18 | 18 | |
| 19 | 19 | make -j$(nproc) install |
| 20 | 20 | |
| 21 | ./zig build test-behavior -Dskip-non-native -Dskip-release -Dskip-wasi | |
| 21 | ./zig build test-behavior -Dskip-non-native -Dskip-release |
ci/azure/windows_msvc_script.bat+1-1| ... | ... | @@ -24,7 +24,7 @@ cd %ZIGBUILDDIR% |
| 24 | 24 | cmake.exe .. -Thost=x64 -G"Visual Studio 16 2019" -A x64 "-DCMAKE_INSTALL_PREFIX=%ZIGINSTALLDIR%" "-DCMAKE_PREFIX_PATH=%ZIGPREFIXPATH%" -DCMAKE_BUILD_TYPE=Release || exit /b |
| 25 | 25 | msbuild /maxcpucount /p:Configuration=Release INSTALL.vcxproj || exit /b |
| 26 | 26 | |
| 27 | "%ZIGINSTALLDIR%\bin\zig.exe" build test -Dskip-wasi || exit /b | |
| 27 | "%ZIGINSTALLDIR%\bin\zig.exe" build test || exit /b | |
| 28 | 28 | |
| 29 | 29 | set "PATH=%CD:~0,2%\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem" |
| 30 | 30 | SET "MSYSTEM=MINGW64" |
ci/drone/linux_script+1-1| ... | ... | @@ -20,7 +20,7 @@ cd build |
| 20 | 20 | cmake .. -DCMAKE_BUILD_TYPE=Release "-DCMAKE_INSTALL_PREFIX=$DISTDIR" -DZIG_STATIC=ON -DCMAKE_PREFIX_PATH=/deps/local |
| 21 | 21 | |
| 22 | 22 | make -j$(nproc) install |
| 23 | ./zig build test -Dskip-release -Dskip-non-native -Dskip-wasi | |
| 23 | ./zig build test -Dskip-release -Dskip-non-native | |
| 24 | 24 | |
| 25 | 25 | if [ -z "$DRONE_PULL_REQUEST" ]; then |
| 26 | 26 | mv ../LICENSE "$DISTDIR/" |
ci/srht/freebsd_script+2-2| ... | ... | @@ -27,13 +27,13 @@ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$PREFIX "-DCMAKE_INSTALL |
| 27 | 27 | make $JOBS install |
| 28 | 28 | |
| 29 | 29 | release/bin/zig build test-fmt |
| 30 | release/bin/zig build test-behavior -Dskip-wasi | |
| 30 | release/bin/zig build test-behavior | |
| 31 | 31 | |
| 32 | 32 | # This test is disabled because it triggers "out of memory" on the sr.ht CI service. |
| 33 | 33 | # See https://github.com/ziglang/zig/issues/3210 |
| 34 | 34 | # release/bin/zig build test-std |
| 35 | 35 | |
| 36 | release/bin/zig build test-compiler-rt -Dskip-wasi | |
| 36 | release/bin/zig build test-compiler-rt | |
| 37 | 37 | release/bin/zig build test-compare-output |
| 38 | 38 | release/bin/zig build test-standalone |
| 39 | 39 | release/bin/zig build test-stack-traces |
test/tests.zig+3-3| ... | ... | @@ -472,9 +472,9 @@ pub fn addPkgTests( |
| 472 | 472 | skip_single_threaded: bool, |
| 473 | 473 | skip_non_native: bool, |
| 474 | 474 | skip_libc: bool, |
| 475 | skip_wasi: bool, | |
| 476 | 475 | is_wine_enabled: bool, |
| 477 | 476 | is_qemu_enabled: bool, |
| 477 | is_wasmtime_enabled: bool, | |
| 478 | 478 | glibc_dir: ?[]const u8, |
| 479 | 479 | ) *build.Step { |
| 480 | 480 | const step = b.step(b.fmt("test-{}", .{name}), desc); |
| ... | ... | @@ -483,7 +483,7 @@ pub fn addPkgTests( |
| 483 | 483 | if (skip_non_native and !test_target.target.isNative()) |
| 484 | 484 | continue; |
| 485 | 485 | |
| 486 | if (skip_wasi) { | |
| 486 | if (!is_wasmtime_enabled) { | |
| 487 | 487 | if (test_target.target.os_tag) |tag| { |
| 488 | 488 | if (tag == .wasi) { |
| 489 | 489 | warn("Skipping {} on wasm32-wasi.\n", .{root_src}); |
| ... | ... | @@ -544,7 +544,7 @@ pub fn addPkgTests( |
| 544 | 544 | these_tests.overrideZigLibDir("lib"); |
| 545 | 545 | these_tests.enable_wine = is_wine_enabled; |
| 546 | 546 | these_tests.enable_qemu = is_qemu_enabled; |
| 547 | these_tests.enable_wasmtime = !skip_wasi; | |
| 547 | these_tests.enable_wasmtime = is_wasmtime_enabled; | |
| 548 | 548 | these_tests.glibc_multi_install_dir = glibc_dir; |
| 549 | 549 | |
| 550 | 550 | step.dependOn(&these_tests.step); |