authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-11-22 21:08:09-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-11-22 21:08:09-07:00
log984acae12d0dd4e24577c485b90b313c5c2d2089
treee6ed1b33a6a02479e661b11103c5f7b8342d2345
parent7717cacacbf86e069ff3ffebf4a1a24f1a74903f

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.

6 files changed, 6 insertions(+), 25 deletions(-)

ci/linux/build-aarch64.sh+1-4
......@@ -63,7 +63,4 @@ stage3-release/bin/zig build test docs \
6363tidy --drop-empty-elements no -qe ../zig-cache/langref.html
6464
6565# Produce the experimental std lib documentation.
66stage3-release/bin/zig test ../lib/std/std.zig \
67 -femit-docs \
68 -fno-emit-bin \
69 --zig-lib-dir "$(pwd)/../lib"
66stage3-release/bin/zig test ../lib/std/std.zig -femit-docs -fno-emit-bin --zig-lib-dir ../lib
ci/linux/build-x86_64-debug.sh+1-4
......@@ -67,7 +67,4 @@ stage3-debug/bin/zig build test \
6767#tidy --drop-empty-elements no -qe ../zig-cache/langref.html
6868
6969# Produce the experimental std lib documentation.
70stage3-debug/bin/zig test ../lib/std/std.zig \
71 -femit-docs \
72 -fno-emit-bin \
73 --zig-lib-dir "$(pwd)/../lib"
70stage3-debug/bin/zig test ../lib/std/std.zig -femit-docs -fno-emit-bin --zig-lib-dir ../lib
ci/linux/build-x86_64-release.sh+1-4
......@@ -63,10 +63,7 @@ stage3-release/bin/zig build test docs \
6363tidy --drop-empty-elements no -qe ../zig-cache/langref.html
6464
6565# Produce the experimental std lib documentation.
66stage3-release/bin/zig test ../lib/std/std.zig \
67 -femit-docs \
68 -fno-emit-bin \
69 --zig-lib-dir "$(pwd)/../lib"
66stage3-release/bin/zig test ../lib/std/std.zig -femit-docs -fno-emit-bin --zig-lib-dir ../lib
7067
7168stage3-release/bin/zig build \
7269 --prefix stage4-release \
ci/macos/build-aarch64.sh+1-5
......@@ -44,8 +44,4 @@ stage3-release/bin/zig build test docs \
4444 --search-prefix "$PREFIX"
4545
4646# Produce the experimental std lib documentation.
47mkdir -p "stage3-release/doc/std"
48stage3-release/bin/zig test "$(pwd)/../lib/std/std.zig" \
49 --zig-lib-dir "$(pwd)/../lib" \
50 -femit-docs="$(pwd)/stage3-release/doc/std" \
51 -fno-emit-bin
47stage3-release/bin/zig test ../lib/std/std.zig -femit-docs -fno-emit-bin --zig-lib-dir ../lib
ci/macos/build-x86_64.sh+1-5
......@@ -51,8 +51,4 @@ stage3-release/bin/zig build test docs \
5151 --search-prefix "$PREFIX"
5252
5353# Produce the experimental std lib documentation.
54mkdir -p "stage3-release/doc/std"
55stage3-release/bin/zig test "$(pwd)/../lib/std/std.zig" \
56 --zig-lib-dir "$(pwd)/../lib" \
57 -femit-docs="$(pwd)/stage3-release/doc/std" \
58 -fno-emit-bin
54stage3-release/bin/zig test ../lib/std/std.zig -femit-docs -fno-emit-bin --zig-lib-dir ../lib
ci/windows/build.ps1+1-3
......@@ -53,11 +53,9 @@ Write-Output " zig build test docs..."
5353CheckLastExitCode
5454
5555# Produce the experimental std lib documentation.
56mkdir "$ZIGINSTALLDIR\doc\std" -force
57
5856Write-Output "zig test std/std.zig..."
5957
6058& "$ZIGINSTALLDIR\bin\zig.exe" test "$ZIGLIBDIR\std\std.zig" `
6159 --zig-lib-dir "$ZIGLIBDIR" `
62 -femit-docs="$ZIGINSTALLDIR\doc\std" `
60 -femit-docs `
6361 -fno-emit-bin