| author | |
| committer | |
| log | 984acae12d0dd4e24577c485b90b313c5c2d2089 |
| tree | e6ed1b33a6a02479e661b11103c5f7b8342d2345 |
| parent | 7717cacacbf86e069ff3ffebf4a1a24f1a74903f |
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 \ |
| 63 | tidy --drop-empty-elements no -qe ../zig-cache/langref.html | 63 | tidy --drop-empty-elements no -qe ../zig-cache/langref.html |
| 64 | 64 | ||
| 65 | # Produce the experimental std lib documentation. | 65 | # Produce the experimental std lib documentation. |
| 66 | stage3-release/bin/zig test ../lib/std/std.zig \ | 66 | stage3-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.html | 67 | #tidy --drop-empty-elements no -qe ../zig-cache/langref.html |
| 68 | 68 | ||
| 69 | # Produce the experimental std lib documentation. | 69 | # Produce the experimental std lib documentation. |
| 70 | stage3-debug/bin/zig test ../lib/std/std.zig \ | 70 | stage3-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 \ |
| 63 | tidy --drop-empty-elements no -qe ../zig-cache/langref.html | 63 | tidy --drop-empty-elements no -qe ../zig-cache/langref.html |
| 64 | 64 | ||
| 65 | # Produce the experimental std lib documentation. | 65 | # Produce the experimental std lib documentation. |
| 66 | stage3-release/bin/zig test ../lib/std/std.zig \ | 66 | stage3-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" | ||
| 70 | 67 | ||
| 71 | stage3-release/bin/zig build \ | 68 | stage3-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" |
| 45 | 45 | ||
| 46 | # Produce the experimental std lib documentation. | 46 | # Produce the experimental std lib documentation. |
| 47 | mkdir -p "stage3-release/doc/std" | 47 | stage3-release/bin/zig test ../lib/std/std.zig -femit-docs -fno-emit-bin --zig-lib-dir ../lib |
| 48 | stage3-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" |
| 52 | 52 | ||
| 53 | # Produce the experimental std lib documentation. | 53 | # Produce the experimental std lib documentation. |
| 54 | mkdir -p "stage3-release/doc/std" | 54 | stage3-release/bin/zig test ../lib/std/std.zig -femit-docs -fno-emit-bin --zig-lib-dir ../lib |
| 55 | stage3-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..." |
| 53 | CheckLastExitCode | 53 | CheckLastExitCode |
| 54 | 54 | ||
| 55 | # Produce the experimental std lib documentation. | 55 | # Produce the experimental std lib documentation. |
| 56 | mkdir "$ZIGINSTALLDIR\doc\std" -force | ||
| 57 | |||
| 58 | Write-Output "zig test std/std.zig..." | 56 | Write-Output "zig test std/std.zig..." |
| 59 | 57 | ||
| 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-bin | 61 | -fno-emit-bin |