From 26140678a5c72604f2baac3cb9d1e5f7b37b6b8d Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 31 Aug 2020 14:54:05 -0700 Subject: [PATCH] ci: skip compile error tests on Windows We're up against the 6 hour limit so this is a time-saving workaround. Compile error tests are generally not OS-specific so the coverage from the other platforms should be sufficient. --- build.zig | 5 ++++- ci/azure/windows_msvc_script.bat | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build.zig b/build.zig index 869fb3f208..8ac2d4f8ba 100644 --- a/build.zig +++ b/build.zig @@ -49,6 +49,7 @@ 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_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_compile_errors = b.option(bool, "skip-compile-errors", "Main test suite skips compile error tests") 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; @@ -184,7 +185,9 @@ pub fn build(b: *Builder) !void { test_step.dependOn(tests.addRunTranslatedCTests(b, test_filter)); // tests for this feature are disabled until we have the self-hosted compiler available // test_step.dependOn(tests.addGenHTests(b, test_filter)); - test_step.dependOn(tests.addCompileErrorTests(b, test_filter, modes)); + if (!skip_compile_errors) { + test_step.dependOn(tests.addCompileErrorTests(b, test_filter, modes)); + } test_step.dependOn(docs_step); } diff --git a/ci/azure/windows_msvc_script.bat b/ci/azure/windows_msvc_script.bat index b2063a8e5f..5c3593fb96 100644 --- a/ci/azure/windows_msvc_script.bat +++ b/ci/azure/windows_msvc_script.bat @@ -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 msbuild /maxcpucount /p:Configuration=Release INSTALL.vcxproj || exit /b -"%ZIGINSTALLDIR%\bin\zig.exe" build test || exit /b +"%ZIGINSTALLDIR%\bin\zig.exe" build test -Dskip-compile-errors || exit /b set "PATH=%CD:~0,2%\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem" SET "MSYSTEM=MINGW64"