Commit c47b46fc8d

Andrew Kelley <andrew@ziglang.org>
2021-07-28 02:16:26
CI: enable stage2 behavior test coverage
1 parent c1285a1
ci/azure/linux_script
@@ -69,9 +69,11 @@ release/bin/zig fmt --check ..
 cmake .. -DZIG_EXECUTABLE="$(pwd)/release/bin/zig"
 make $JOBS install
 
-for step in test-toolchain test-std docs; do
-  release/bin/zig build $step -Denable-qemu -Denable-wasmtime
-done
+release/bin/zig test ../test/behavior.zig -fno-stage1 -fLLVM -I ../test
+
+release/bin/zig build test-toolchain -Denable-qemu -Denable-wasmtime
+release/bin/zig build test-std       -Denable-qemu -Denable-wasmtime
+release/bin/zig build docs           -Denable-qemu -Denable-wasmtime
 
 # Look for HTML errors.
 tidy -qe ../zig-cache/langref.html
ci/azure/macos_script
@@ -54,9 +54,12 @@ make $JOBS install
 cmake .. -DZIG_EXECUTABLE="$(pwd)/release/bin/zig"
 make $JOBS install
 
-for step in test-toolchain test-std docs; do
-  release/bin/zig build $step
-done
+# TODO figure out why this causes a segmentation fault
+# release/bin/zig test ../test/behavior.zig -fno-stage1 -fLLVM -I ../test
+
+release/bin/zig build test-toolchain
+release/bin/zig build test-std
+release/bin/zig build docs
 
 if [ "${BUILD_REASON}" != "PullRequest" ]; then
   mv ../LICENSE release/
ci/azure/windows_msvc_script.bat
@@ -26,6 +26,10 @@ 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 -DZIG_OMIT_STAGE2=ON || exit /b
 msbuild /maxcpucount /p:Configuration=Release INSTALL.vcxproj || exit /b
 
+REM Sadly, stage2 is omitted from this build to save memory on the CI server. Once self-hosted is
+REM built with itself and does not gobble as much memory, we can enable these tests.
+REM "%ZIGINSTALLDIR%\bin\zig.exe" test "..\test\behavior.zig" -fno-stage1 -fLLVM -I "..\test" || exit /b
+
 "%ZIGINSTALLDIR%\bin\zig.exe" build test-toolchain -Dskip-non-native -Dskip-stage2-tests || exit /b
 "%ZIGINSTALLDIR%\bin\zig.exe" build test-std -Dskip-non-native || exit /b
 "%ZIGINSTALLDIR%\bin\zig.exe" build docs || exit /b
ci/srht/freebsd_script
@@ -38,6 +38,11 @@ cmake .. \
     -GNinja
 samu install
 
+# TODO ld.lld: error: undefined symbol: main
+# >>> referenced by crt1_c.c:75 (/usr/src/lib/csu/amd64/crt1_c.c:75)
+# >>>               /usr/lib/crt1.o:(_start)
+#release/bin/zig test ../test/behavior.zig -fno-stage1 -fLLVM -I ../test
+
 # Here we skip some tests to save time.
 release/bin/zig build test -Dskip-compile-errors -Dskip-non-native
 
ci/srht/netbsd_script
@@ -51,6 +51,11 @@ samu install
 unset CC
 unset CXX
 
+# TODO ld.lld: error: undefined symbol: main
+#>>> referenced by crt0-common.c
+#>>>               /usr/lib/crt0.o:(___start)
+#release/bin/zig test ../test/behavior.zig -fno-stage1 -fLLVM -I ../test
+
 # Here we skip some tests to save time.
 release/bin/zig build test -Dskip-compile-errors -Dskip-non-native