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.
This commit is contained in:
Andrew Kelley 2022-11-22 21:08:09 -07:00
parent 7717cacacb
commit 984acae12d
6 changed files with 6 additions and 25 deletions

View File

@ -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

View File

@ -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

View File

@ -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 \

View File

@ -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

View File

@ -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

View File

@ -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