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 \...@@ -63,7 +63,4 @@ stage3-release/bin/zig build test docs \
63tidy --drop-empty-elements no -qe ../zig-cache/langref.html63tidy --drop-empty-elements no -qe ../zig-cache/langref.html
6464
65# Produce the experimental std lib documentation.65# Produce the experimental std lib documentation.
66stage3-release/bin/zig test ../lib/std/std.zig \66stage3-release/bin/zig test ../lib/std/std.zig -femit-docs -fno-emit-bin --zig-lib-dir ../lib
67 -femit-docs \
68 -fno-emit-bin \
69 --zig-lib-dir "$(pwd)/../lib"
ci/linux/build-x86_64-debug.sh+1-4
...@@ -67,7 +67,4 @@ stage3-debug/bin/zig build test \...@@ -67,7 +67,4 @@ stage3-debug/bin/zig build test \
67#tidy --drop-empty-elements no -qe ../zig-cache/langref.html67#tidy --drop-empty-elements no -qe ../zig-cache/langref.html
6868
69# Produce the experimental std lib documentation.69# Produce the experimental std lib documentation.
70stage3-debug/bin/zig test ../lib/std/std.zig \70stage3-debug/bin/zig test ../lib/std/std.zig -femit-docs -fno-emit-bin --zig-lib-dir ../lib
71 -femit-docs \
72 -fno-emit-bin \
73 --zig-lib-dir "$(pwd)/../lib"
ci/linux/build-x86_64-release.sh+1-4
...@@ -63,10 +63,7 @@ stage3-release/bin/zig build test docs \...@@ -63,10 +63,7 @@ stage3-release/bin/zig build test docs \
63tidy --drop-empty-elements no -qe ../zig-cache/langref.html63tidy --drop-empty-elements no -qe ../zig-cache/langref.html
6464
65# Produce the experimental std lib documentation.65# Produce the experimental std lib documentation.
66stage3-release/bin/zig test ../lib/std/std.zig \66stage3-release/bin/zig test ../lib/std/std.zig -femit-docs -fno-emit-bin --zig-lib-dir ../lib
67 -femit-docs \
68 -fno-emit-bin \
69 --zig-lib-dir "$(pwd)/../lib"
7067
71stage3-release/bin/zig build \68stage3-release/bin/zig build \
72 --prefix stage4-release \69 --prefix stage4-release \
ci/macos/build-aarch64.sh+1-5
...@@ -44,8 +44,4 @@ stage3-release/bin/zig build test docs \...@@ -44,8 +44,4 @@ stage3-release/bin/zig build test docs \
44 --search-prefix "$PREFIX"44 --search-prefix "$PREFIX"
4545
46# Produce the experimental std lib documentation.46# Produce the experimental std lib documentation.
47mkdir -p "stage3-release/doc/std"47stage3-release/bin/zig test ../lib/std/std.zig -femit-docs -fno-emit-bin --zig-lib-dir ../lib
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
ci/macos/build-x86_64.sh+1-5
...@@ -51,8 +51,4 @@ stage3-release/bin/zig build test docs \...@@ -51,8 +51,4 @@ stage3-release/bin/zig build test docs \
51 --search-prefix "$PREFIX"51 --search-prefix "$PREFIX"
5252
53# Produce the experimental std lib documentation.53# Produce the experimental std lib documentation.
54mkdir -p "stage3-release/doc/std"54stage3-release/bin/zig test ../lib/std/std.zig -femit-docs -fno-emit-bin --zig-lib-dir ../lib
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
ci/windows/build.ps1+1-3
...@@ -53,11 +53,9 @@ Write-Output " zig build test docs..."...@@ -53,11 +53,9 @@ Write-Output " zig build test docs..."
53CheckLastExitCode53CheckLastExitCode
5454
55# Produce the experimental std lib documentation.55# Produce the experimental std lib documentation.
56mkdir "$ZIGINSTALLDIR\doc\std" -force
57
58Write-Output "zig test std/std.zig..."56Write-Output "zig test std/std.zig..."
5957
60& "$ZIGINSTALLDIR\bin\zig.exe" test "$ZIGLIBDIR\std\std.zig" `58& "$ZIGINSTALLDIR\bin\zig.exe" test "$ZIGLIBDIR\std\std.zig" `
61 --zig-lib-dir "$ZIGLIBDIR" `59 --zig-lib-dir "$ZIGLIBDIR" `
62 -femit-docs="$ZIGINSTALLDIR\doc\std" `60 -femit-docs `
63 -fno-emit-bin61 -fno-emit-bin