Disable tests requiring Wasmtime be default; require -Denable-wasmtime flag otherwise
parent
bd9a616586
commit
40812063cc
|
@ -60,7 +60,6 @@ pub fn build(b: *Builder) !void {
|
||||||
const skip_release_safe = b.option(bool, "skip-release-safe", "Main test suite skips release-safe builds") orelse skip_release;
|
const skip_release_safe = b.option(bool, "skip-release-safe", "Main test suite skips release-safe builds") orelse skip_release;
|
||||||
const skip_non_native = b.option(bool, "skip-non-native", "Main test suite skips non-native builds") orelse false;
|
const skip_non_native = b.option(bool, "skip-non-native", "Main test suite skips non-native builds") orelse false;
|
||||||
const skip_libc = b.option(bool, "skip-libc", "Main test suite skips tests that link libc") orelse false;
|
const skip_libc = b.option(bool, "skip-libc", "Main test suite skips tests that link libc") orelse false;
|
||||||
const skip_wasi = b.option(bool, "skip-wasi", "Main test suite skips WASI build") orelse false;
|
|
||||||
|
|
||||||
const only_install_lib_files = b.option(bool, "lib-files-only", "Only install library files") orelse false;
|
const only_install_lib_files = b.option(bool, "lib-files-only", "Only install library files") orelse false;
|
||||||
const enable_llvm = b.option(bool, "enable-llvm", "Build self-hosted compiler with LLVM backend enabled") orelse false;
|
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 {
|
||||||
|
|
||||||
const is_wine_enabled = b.option(bool, "enable-wine", "Use Wine to run cross compiled Windows tests") orelse false;
|
const is_wine_enabled = b.option(bool, "enable-wine", "Use Wine to run cross compiled Windows tests") orelse false;
|
||||||
const is_qemu_enabled = b.option(bool, "enable-qemu", "Use QEMU to run cross compiled foreign architecture tests") orelse false;
|
const is_qemu_enabled = b.option(bool, "enable-qemu", "Use QEMU to run cross compiled foreign architecture tests") orelse false;
|
||||||
|
const is_wasmtime_enabled = b.option(bool, "enable-wasmtime", "Use Wasmtime to enable and run WASI libstd tests") orelse false;
|
||||||
const glibc_multi_dir = b.option([]const u8, "enable-foreign-glibc", "Provide directory with glibc installations to run cross compiled tests that link glibc");
|
const glibc_multi_dir = b.option([]const u8, "enable-foreign-glibc", "Provide directory with glibc installations to run cross compiled tests that link glibc");
|
||||||
|
|
||||||
const test_stage2_step = b.step("test-stage2", "Run the stage2 compiler tests");
|
const test_stage2_step = b.step("test-stage2", "Run the stage2 compiler tests");
|
||||||
|
@ -117,11 +117,11 @@ pub fn build(b: *Builder) !void {
|
||||||
fmt_step.dependOn(&fmt_build_zig.step);
|
fmt_step.dependOn(&fmt_build_zig.step);
|
||||||
|
|
||||||
// TODO for the moment, skip wasm32-wasi until bugs are sorted out.
|
// TODO for the moment, skip wasm32-wasi until bugs are sorted out.
|
||||||
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));
|
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));
|
||||||
|
|
||||||
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));
|
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));
|
||||||
|
|
||||||
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));
|
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));
|
||||||
|
|
||||||
test_step.dependOn(tests.addCompareOutputTests(b, test_filter, modes));
|
test_step.dependOn(tests.addCompareOutputTests(b, test_filter, modes));
|
||||||
test_step.dependOn(tests.addStandaloneTests(b, test_filter, modes));
|
test_step.dependOn(tests.addStandaloneTests(b, test_filter, modes));
|
||||||
|
|
|
@ -50,7 +50,7 @@ mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake .. -DCMAKE_BUILD_TYPE=Release
|
cmake .. -DCMAKE_BUILD_TYPE=Release
|
||||||
make -j$(nproc) install
|
make -j$(nproc) install
|
||||||
./zig build test -Denable-qemu
|
./zig build test -Denable-qemu -Denable-wasmtime
|
||||||
VERSION="$(./zig version)"
|
VERSION="$(./zig version)"
|
||||||
|
|
||||||
if [ "${BUILD_REASON}" != "PullRequest" ]; then
|
if [ "${BUILD_REASON}" != "PullRequest" ]; then
|
||||||
|
|
|
@ -88,7 +88,7 @@ mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_INSTALL_PREFIX=$(pwd)/release -DZIG_STATIC=ON
|
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_INSTALL_PREFIX=$(pwd)/release -DZIG_STATIC=ON
|
||||||
make $JOBS install
|
make $JOBS install
|
||||||
release/bin/zig build test -Dskip-wasi
|
release/bin/zig build test
|
||||||
|
|
||||||
if [ "${BUILD_REASON}" != "PullRequest" ]; then
|
if [ "${BUILD_REASON}" != "PullRequest" ]; then
|
||||||
mv ../LICENSE release/
|
mv ../LICENSE release/
|
||||||
|
|
|
@ -18,4 +18,4 @@ cmake .. -G 'MSYS Makefiles' -DCMAKE_BUILD_TYPE=RelWithDebInfo $CMAKEFLAGS -DCMA
|
||||||
|
|
||||||
make -j$(nproc) install
|
make -j$(nproc) install
|
||||||
|
|
||||||
./zig build test-behavior -Dskip-non-native -Dskip-release -Dskip-wasi
|
./zig build test-behavior -Dskip-non-native -Dskip-release
|
||||||
|
|
|
@ -24,7 +24,7 @@ cd %ZIGBUILDDIR%
|
||||||
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
|
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
|
||||||
msbuild /maxcpucount /p:Configuration=Release INSTALL.vcxproj || exit /b
|
msbuild /maxcpucount /p:Configuration=Release INSTALL.vcxproj || exit /b
|
||||||
|
|
||||||
"%ZIGINSTALLDIR%\bin\zig.exe" build test -Dskip-wasi || exit /b
|
"%ZIGINSTALLDIR%\bin\zig.exe" build test || exit /b
|
||||||
|
|
||||||
set "PATH=%CD:~0,2%\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem"
|
set "PATH=%CD:~0,2%\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem"
|
||||||
SET "MSYSTEM=MINGW64"
|
SET "MSYSTEM=MINGW64"
|
||||||
|
|
|
@ -20,7 +20,7 @@ cd build
|
||||||
cmake .. -DCMAKE_BUILD_TYPE=Release "-DCMAKE_INSTALL_PREFIX=$DISTDIR" -DZIG_STATIC=ON -DCMAKE_PREFIX_PATH=/deps/local
|
cmake .. -DCMAKE_BUILD_TYPE=Release "-DCMAKE_INSTALL_PREFIX=$DISTDIR" -DZIG_STATIC=ON -DCMAKE_PREFIX_PATH=/deps/local
|
||||||
|
|
||||||
make -j$(nproc) install
|
make -j$(nproc) install
|
||||||
./zig build test -Dskip-release -Dskip-non-native -Dskip-wasi
|
./zig build test -Dskip-release -Dskip-non-native
|
||||||
|
|
||||||
if [ -z "$DRONE_PULL_REQUEST" ]; then
|
if [ -z "$DRONE_PULL_REQUEST" ]; then
|
||||||
mv ../LICENSE "$DISTDIR/"
|
mv ../LICENSE "$DISTDIR/"
|
||||||
|
|
|
@ -27,13 +27,13 @@ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$PREFIX "-DCMAKE_INSTALL
|
||||||
make $JOBS install
|
make $JOBS install
|
||||||
|
|
||||||
release/bin/zig build test-fmt
|
release/bin/zig build test-fmt
|
||||||
release/bin/zig build test-behavior -Dskip-wasi
|
release/bin/zig build test-behavior
|
||||||
|
|
||||||
# This test is disabled because it triggers "out of memory" on the sr.ht CI service.
|
# This test is disabled because it triggers "out of memory" on the sr.ht CI service.
|
||||||
# See https://github.com/ziglang/zig/issues/3210
|
# See https://github.com/ziglang/zig/issues/3210
|
||||||
# release/bin/zig build test-std
|
# release/bin/zig build test-std
|
||||||
|
|
||||||
release/bin/zig build test-compiler-rt -Dskip-wasi
|
release/bin/zig build test-compiler-rt
|
||||||
release/bin/zig build test-compare-output
|
release/bin/zig build test-compare-output
|
||||||
release/bin/zig build test-standalone
|
release/bin/zig build test-standalone
|
||||||
release/bin/zig build test-stack-traces
|
release/bin/zig build test-stack-traces
|
||||||
|
|
|
@ -472,9 +472,9 @@ pub fn addPkgTests(
|
||||||
skip_single_threaded: bool,
|
skip_single_threaded: bool,
|
||||||
skip_non_native: bool,
|
skip_non_native: bool,
|
||||||
skip_libc: bool,
|
skip_libc: bool,
|
||||||
skip_wasi: bool,
|
|
||||||
is_wine_enabled: bool,
|
is_wine_enabled: bool,
|
||||||
is_qemu_enabled: bool,
|
is_qemu_enabled: bool,
|
||||||
|
is_wasmtime_enabled: bool,
|
||||||
glibc_dir: ?[]const u8,
|
glibc_dir: ?[]const u8,
|
||||||
) *build.Step {
|
) *build.Step {
|
||||||
const step = b.step(b.fmt("test-{}", .{name}), desc);
|
const step = b.step(b.fmt("test-{}", .{name}), desc);
|
||||||
|
@ -483,7 +483,7 @@ pub fn addPkgTests(
|
||||||
if (skip_non_native and !test_target.target.isNative())
|
if (skip_non_native and !test_target.target.isNative())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (skip_wasi) {
|
if (!is_wasmtime_enabled) {
|
||||||
if (test_target.target.os_tag) |tag| {
|
if (test_target.target.os_tag) |tag| {
|
||||||
if (tag == .wasi) {
|
if (tag == .wasi) {
|
||||||
warn("Skipping {} on wasm32-wasi.\n", .{root_src});
|
warn("Skipping {} on wasm32-wasi.\n", .{root_src});
|
||||||
|
@ -544,7 +544,7 @@ pub fn addPkgTests(
|
||||||
these_tests.overrideZigLibDir("lib");
|
these_tests.overrideZigLibDir("lib");
|
||||||
these_tests.enable_wine = is_wine_enabled;
|
these_tests.enable_wine = is_wine_enabled;
|
||||||
these_tests.enable_qemu = is_qemu_enabled;
|
these_tests.enable_qemu = is_qemu_enabled;
|
||||||
these_tests.enable_wasmtime = !skip_wasi;
|
these_tests.enable_wasmtime = is_wasmtime_enabled;
|
||||||
these_tests.glibc_multi_install_dir = glibc_dir;
|
these_tests.glibc_multi_install_dir = glibc_dir;
|
||||||
|
|
||||||
step.dependOn(&these_tests.step);
|
step.dependOn(&these_tests.step);
|
||||||
|
|
Loading…
Reference in New Issue