Commit 984acae12d

Andrew Kelley <andrew@ziglang.org>
2022-11-23 05:08:09
CI: use consistent relative/absolute paths for zig test commands
Standard library tests require the root source file to be the corresponding file inside the Zig lib directory. In other words, there may not be two copies of the standard library. After the changes in this branch, Zig no longer notices that `../lib/std.zig` and `$(pwd)/../lib/std.zig` are the same file because one is relative and one is absolute.
1 parent 7717cac
ci/linux/build-aarch64.sh
@@ -63,7 +63,4 @@ stage3-release/bin/zig build test docs \
 tidy --drop-empty-elements no -qe ../zig-cache/langref.html
 
 # Produce the experimental std lib documentation.
-stage3-release/bin/zig test ../lib/std/std.zig \
-  -femit-docs \
-  -fno-emit-bin \
-  --zig-lib-dir "$(pwd)/../lib"
+stage3-release/bin/zig test ../lib/std/std.zig -femit-docs -fno-emit-bin --zig-lib-dir ../lib
ci/linux/build-x86_64-debug.sh
@@ -67,7 +67,4 @@ stage3-debug/bin/zig build test \
 #tidy --drop-empty-elements no -qe ../zig-cache/langref.html
 
 # Produce the experimental std lib documentation.
-stage3-debug/bin/zig test ../lib/std/std.zig \
-  -femit-docs \
-  -fno-emit-bin \
-  --zig-lib-dir "$(pwd)/../lib"
+stage3-debug/bin/zig test ../lib/std/std.zig -femit-docs -fno-emit-bin --zig-lib-dir ../lib
ci/linux/build-x86_64-release.sh
@@ -63,10 +63,7 @@ stage3-release/bin/zig build test docs \
 tidy --drop-empty-elements no -qe ../zig-cache/langref.html
 
 # Produce the experimental std lib documentation.
-stage3-release/bin/zig test ../lib/std/std.zig \
-  -femit-docs \
-  -fno-emit-bin \
-  --zig-lib-dir "$(pwd)/../lib"
+stage3-release/bin/zig test ../lib/std/std.zig -femit-docs -fno-emit-bin --zig-lib-dir ../lib
 
 stage3-release/bin/zig build \
   --prefix stage4-release \
ci/macos/build-aarch64.sh
@@ -44,8 +44,4 @@ stage3-release/bin/zig build test docs \
   --search-prefix "$PREFIX"
 
 # Produce the experimental std lib documentation.
-mkdir -p "stage3-release/doc/std"
-stage3-release/bin/zig test "$(pwd)/../lib/std/std.zig" \
-  --zig-lib-dir "$(pwd)/../lib" \
-  -femit-docs="$(pwd)/stage3-release/doc/std" \
-  -fno-emit-bin
+stage3-release/bin/zig test ../lib/std/std.zig -femit-docs -fno-emit-bin --zig-lib-dir ../lib
ci/macos/build-x86_64.sh
@@ -51,8 +51,4 @@ stage3-release/bin/zig build test docs \
   --search-prefix "$PREFIX"
 
 # Produce the experimental std lib documentation.
-mkdir -p "stage3-release/doc/std"
-stage3-release/bin/zig test "$(pwd)/../lib/std/std.zig" \
-  --zig-lib-dir "$(pwd)/../lib" \
-  -femit-docs="$(pwd)/stage3-release/doc/std" \
-  -fno-emit-bin
+stage3-release/bin/zig test ../lib/std/std.zig -femit-docs -fno-emit-bin --zig-lib-dir ../lib
ci/windows/build.ps1
@@ -53,11 +53,9 @@ Write-Output " zig build test docs..."
 CheckLastExitCode
 
 # Produce the experimental std lib documentation.
-mkdir "$ZIGINSTALLDIR\doc\std" -force
-
 Write-Output "zig test std/std.zig..."
 
 & "$ZIGINSTALLDIR\bin\zig.exe" test "$ZIGLIBDIR\std\std.zig" `
     --zig-lib-dir "$ZIGLIBDIR" `
-    -femit-docs="$ZIGINSTALLDIR\doc\std" `
+    -femit-docs `
     -fno-emit-bin