diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-04-25 13:43:27 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-04-25 13:43:27 +0000 |
| commit | a7c797909c939d5427fe0d0eaa3e8210b76a5431 (patch) | |
| tree | 53f0eba430607827c7893fcefa25e32bce8c32dc /scripts | |
| parent | b56d4ab66b8574e8b583793e536326a40eeab384 (diff) | |
| download | rust-a7c797909c939d5427fe0d0eaa3e8210b76a5431.tar.gz rust-a7c797909c939d5427fe0d0eaa3e8210b76a5431.zip | |
Make rustdoc using run-make tests work
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/test_rustc_tests.sh | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/scripts/test_rustc_tests.sh b/scripts/test_rustc_tests.sh index 224a9654d72..58cd544754a 100755 --- a/scripts/test_rustc_tests.sh +++ b/scripts/test_rustc_tests.sh @@ -126,17 +126,12 @@ rm tests/ui/proc-macro/no-missing-docs.rs # same rm tests/ui/rust-2018/proc-macro-crate-in-paths.rs # same rm tests/ui/proc-macro/allowed-signatures.rs # same +# rustdoc-clif passes extra args, suppressing the help message when no args are passed +rm -r tests/run-make/issue-88756-default-output + # doesn't work due to the way the rustc test suite is invoked. # should work when using ./x.py test the way it is intended # ============================================================ -rm -r tests/run-make/emit-shared-files # requires the rustdoc executable in dist/bin/ -rm -r tests/run-make/unstable-flag-required # same -rm -r tests/run-make/rustdoc-* # same -rm -r tests/run-make/issue-88756-default-output # same -rm -r tests/run-make/doctests-keep-binaries # same -rm -r tests/run-make/exit-code # same -rm -r tests/run-make/issue-22131 # same -rm -r tests/run-make/issue-38237 # same rm -r tests/run-make/remap-path-prefix-dwarf # requires llvm-dwarfdump rm -r tests/ui/consts/missing_span_in_backtrace.rs # expects sysroot source to be elsewhere @@ -162,6 +157,26 @@ rm tests/ui/process/nofile-limit.rs # TODO some AArch64 linking issue rm tests/ui/stdio-is-blocking.rs # really slow with unoptimized libstd +cp ../dist/bin/rustdoc-clif ../dist/bin/rustdoc # some tests expect bin/rustdoc to exist + +# prevent $(RUSTDOC) from picking up the sysroot built by x.py. It conflicts with the one used by +# rustdoc-clif +cat <<EOF | git apply - +diff --git a/tests/run-make/tools.mk b/tests/run-make/tools.mk +index ea06b620c4c..b969d0009c6 100644 +--- a/tests/run-make/tools.mk ++++ b/tests/run-make/tools.mk +@@ -9,7 +9,7 @@ RUSTC_ORIGINAL := \$(RUSTC) + BARE_RUSTC := \$(HOST_RPATH_ENV) '\$(RUSTC)' + BARE_RUSTDOC := \$(HOST_RPATH_ENV) '\$(RUSTDOC)' + RUSTC := \$(BARE_RUSTC) --out-dir \$(TMPDIR) -L \$(TMPDIR) \$(RUSTFLAGS) +-RUSTDOC := \$(BARE_RUSTDOC) -L \$(TARGET_RPATH_DIR) ++RUSTDOC := \$(BARE_RUSTDOC) + ifdef RUSTC_LINKER + RUSTC := \$(RUSTC) -Clinker='\$(RUSTC_LINKER)' + RUSTDOC := \$(RUSTDOC) -Clinker='\$(RUSTC_LINKER)' +EOF + echo "[TEST] rustc test suite" COMPILETEST_FORCE_STAGE0=1 ./x.py test --stage 0 --test-args=--nocapture tests/{codegen-units,run-make,run-pass-valgrind,ui,incremental} popd |
