authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2020-05-13 08:08:16+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2020-05-18 16:12:03+02:00
log40812063cca77a84c58c8760ddf0ad9da3356962
tree2c48d7c29b0b58a02e4abd3aae4d171aa5e94b8e
parentbd9a616586dba45e2e1788e4f0b9ce6953c36d1d

Disable tests requiring Wasmtime be default; require -Denable-wasmtime flag otherwise


8 files changed, 14 insertions(+), 14 deletions(-)

build.zig+4-4
...@@ -60,7 +60,6 @@ pub fn build(b: *Builder) !void {...@@ -60,7 +60,6 @@ pub fn build(b: *Builder) !void {
60 const skip_release_safe = b.option(bool, "skip-release-safe", "Main test suite skips release-safe builds") orelse skip_release;60 const skip_release_safe = b.option(bool, "skip-release-safe", "Main test suite skips release-safe builds") orelse skip_release;
61 const skip_non_native = b.option(bool, "skip-non-native", "Main test suite skips non-native builds") orelse false;61 const skip_non_native = b.option(bool, "skip-non-native", "Main test suite skips non-native builds") orelse false;
62 const skip_libc = b.option(bool, "skip-libc", "Main test suite skips tests that link libc") orelse false;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;
6463
65 const only_install_lib_files = b.option(bool, "lib-files-only", "Only install library files") orelse false;64 const only_install_lib_files = b.option(bool, "lib-files-only", "Only install library files") orelse false;
66 const enable_llvm = b.option(bool, "enable-llvm", "Build self-hosted compiler with LLVM backend enabled") orelse false;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,6 +86,7 @@ pub fn build(b: *Builder) !void {
8786
88 const is_wine_enabled = b.option(bool, "enable-wine", "Use Wine to run cross compiled Windows tests") orelse false;87 const is_wine_enabled = b.option(bool, "enable-wine", "Use Wine to run cross compiled Windows tests") orelse false;
89 const is_qemu_enabled = b.option(bool, "enable-qemu", "Use QEMU to run cross compiled foreign architecture tests") orelse false;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 const glibc_multi_dir = b.option([]const u8, "enable-foreign-glibc", "Provide directory with glibc installations to run cross compiled tests that link glibc");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");
9191
92 const test_stage2_step = b.step("test-stage2", "Run the stage2 compiler tests");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,11 +117,11 @@ pub fn build(b: *Builder) !void {
117 fmt_step.dependOn(&fmt_build_zig.step);117 fmt_step.dependOn(&fmt_build_zig.step);
118118
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, 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));
121121
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));
123123
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));
125125
126 test_step.dependOn(tests.addCompareOutputTests(b, test_filter, modes));126 test_step.dependOn(tests.addCompareOutputTests(b, test_filter, modes));
127 test_step.dependOn(tests.addStandaloneTests(b, test_filter, modes));127 test_step.dependOn(tests.addStandaloneTests(b, test_filter, modes));
ci/azure/linux_script+1-1
...@@ -50,7 +50,7 @@ mkdir build...@@ -50,7 +50,7 @@ mkdir build
50cd build50cd build
51cmake .. -DCMAKE_BUILD_TYPE=Release51cmake .. -DCMAKE_BUILD_TYPE=Release
52make -j$(nproc) install52make -j$(nproc) install
53./zig build test -Denable-qemu53./zig build test -Denable-qemu -Denable-wasmtime
54VERSION="$(./zig version)"54VERSION="$(./zig version)"
5555
56if [ "${BUILD_REASON}" != "PullRequest" ]; then56if [ "${BUILD_REASON}" != "PullRequest" ]; then
ci/azure/macos_script+1-1
...@@ -88,7 +88,7 @@ mkdir build...@@ -88,7 +88,7 @@ mkdir build
88cd build88cd build
89cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_INSTALL_PREFIX=$(pwd)/release -DZIG_STATIC=ON89cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_INSTALL_PREFIX=$(pwd)/release -DZIG_STATIC=ON
90make $JOBS install90make $JOBS install
91release/bin/zig build test -Dskip-wasi91release/bin/zig build test
9292
93if [ "${BUILD_REASON}" != "PullRequest" ]; then93if [ "${BUILD_REASON}" != "PullRequest" ]; then
94 mv ../LICENSE release/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,4 +18,4 @@ cmake .. -G 'MSYS Makefiles' -DCMAKE_BUILD_TYPE=RelWithDebInfo $CMAKEFLAGS -DCMA
1818
19make -j$(nproc) install19make -j$(nproc) install
2020
21./zig build test-behavior -Dskip-non-native -Dskip-release -Dskip-wasi21./zig build test-behavior -Dskip-non-native -Dskip-release
ci/azure/windows_msvc_script.bat+1-1
...@@ -24,7 +24,7 @@ cd %ZIGBUILDDIR%...@@ -24,7 +24,7 @@ cd %ZIGBUILDDIR%
24cmake.exe .. -Thost=x64 -G"Visual Studio 16 2019" -A x64 "-DCMAKE_INSTALL_PREFIX=%ZIGINSTALLDIR%" "-DCMAKE_PREFIX_PATH=%ZIGPREFIXPATH%" -DCMAKE_BUILD_TYPE=Release || exit /b24cmake.exe .. -Thost=x64 -G"Visual Studio 16 2019" -A x64 "-DCMAKE_INSTALL_PREFIX=%ZIGINSTALLDIR%" "-DCMAKE_PREFIX_PATH=%ZIGPREFIXPATH%" -DCMAKE_BUILD_TYPE=Release || exit /b
25msbuild /maxcpucount /p:Configuration=Release INSTALL.vcxproj || exit /b25msbuild /maxcpucount /p:Configuration=Release INSTALL.vcxproj || exit /b
2626
27"%ZIGINSTALLDIR%\bin\zig.exe" build test -Dskip-wasi || exit /b27"%ZIGINSTALLDIR%\bin\zig.exe" build test || exit /b
2828
29set "PATH=%CD:~0,2%\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem"29set "PATH=%CD:~0,2%\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem"
30SET "MSYSTEM=MINGW64"30SET "MSYSTEM=MINGW64"
ci/drone/linux_script+1-1
...@@ -20,7 +20,7 @@ cd build...@@ -20,7 +20,7 @@ cd build
20cmake .. -DCMAKE_BUILD_TYPE=Release "-DCMAKE_INSTALL_PREFIX=$DISTDIR" -DZIG_STATIC=ON -DCMAKE_PREFIX_PATH=/deps/local20cmake .. -DCMAKE_BUILD_TYPE=Release "-DCMAKE_INSTALL_PREFIX=$DISTDIR" -DZIG_STATIC=ON -DCMAKE_PREFIX_PATH=/deps/local
2121
22make -j$(nproc) install22make -j$(nproc) install
23./zig build test -Dskip-release -Dskip-non-native -Dskip-wasi23./zig build test -Dskip-release -Dskip-non-native
2424
25if [ -z "$DRONE_PULL_REQUEST" ]; then25if [ -z "$DRONE_PULL_REQUEST" ]; then
26 mv ../LICENSE "$DISTDIR/"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,13 +27,13 @@ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$PREFIX "-DCMAKE_INSTALL
27make $JOBS install27make $JOBS install
2828
29release/bin/zig build test-fmt29release/bin/zig build test-fmt
30release/bin/zig build test-behavior -Dskip-wasi30release/bin/zig build test-behavior
3131
32# This test is disabled because it triggers "out of memory" on the sr.ht CI service.32# This test is disabled because it triggers "out of memory" on the sr.ht CI service.
33# See https://github.com/ziglang/zig/issues/321033# See https://github.com/ziglang/zig/issues/3210
34# release/bin/zig build test-std34# release/bin/zig build test-std
3535
36release/bin/zig build test-compiler-rt -Dskip-wasi36release/bin/zig build test-compiler-rt
37release/bin/zig build test-compare-output37release/bin/zig build test-compare-output
38release/bin/zig build test-standalone38release/bin/zig build test-standalone
39release/bin/zig build test-stack-traces39release/bin/zig build test-stack-traces
test/tests.zig+3-3
...@@ -472,9 +472,9 @@ pub fn addPkgTests(...@@ -472,9 +472,9 @@ pub fn addPkgTests(
472 skip_single_threaded: bool,472 skip_single_threaded: bool,
473 skip_non_native: bool,473 skip_non_native: bool,
474 skip_libc: bool,474 skip_libc: bool,
475 skip_wasi: bool,
476 is_wine_enabled: bool,475 is_wine_enabled: bool,
477 is_qemu_enabled: bool,476 is_qemu_enabled: bool,
477 is_wasmtime_enabled: bool,
478 glibc_dir: ?[]const u8,478 glibc_dir: ?[]const u8,
479) *build.Step {479) *build.Step {
480 const step = b.step(b.fmt("test-{}", .{name}), desc);480 const step = b.step(b.fmt("test-{}", .{name}), desc);
...@@ -483,7 +483,7 @@ pub fn addPkgTests(...@@ -483,7 +483,7 @@ 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;
485485
486 if (skip_wasi) {486 if (!is_wasmtime_enabled) {
487 if (test_target.target.os_tag) |tag| {487 if (test_target.target.os_tag) |tag| {
488 if (tag == .wasi) {488 if (tag == .wasi) {
489 warn("Skipping {} on wasm32-wasi.\n", .{root_src});489 warn("Skipping {} on wasm32-wasi.\n", .{root_src});
...@@ -544,7 +544,7 @@ pub fn addPkgTests(...@@ -544,7 +544,7 @@ pub fn addPkgTests(
544 these_tests.overrideZigLibDir("lib");544 these_tests.overrideZigLibDir("lib");
545 these_tests.enable_wine = is_wine_enabled;545 these_tests.enable_wine = is_wine_enabled;
546 these_tests.enable_qemu = is_qemu_enabled;546 these_tests.enable_qemu = is_qemu_enabled;
547 these_tests.enable_wasmtime = !skip_wasi;547 these_tests.enable_wasmtime = is_wasmtime_enabled;
548 these_tests.glibc_multi_install_dir = glibc_dir;548 these_tests.glibc_multi_install_dir = glibc_dir;
549549
550 step.dependOn(&these_tests.step);550 step.dependOn(&these_tests.step);