summaryrefslogtreecommitdiffstats
path: root/tests/run-make/rustdoc-verify-output-files/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:29 +0000
commit631cd5845e8de329d0e227aaa707d7ea228b8f8f (patch)
treea1b87c8f8cad01cf18f7c5f57a08f102771ed303 /tests/run-make/rustdoc-verify-output-files/Makefile
parentAdding debian version 1.69.0+dfsg1-1. (diff)
downloadrustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.tar.xz
rustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.zip
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/run-make/rustdoc-verify-output-files/Makefile')
-rw-r--r--tests/run-make/rustdoc-verify-output-files/Makefile20
1 files changed, 8 insertions, 12 deletions
diff --git a/tests/run-make/rustdoc-verify-output-files/Makefile b/tests/run-make/rustdoc-verify-output-files/Makefile
index bfabbbc65..76f233ab4 100644
--- a/tests/run-make/rustdoc-verify-output-files/Makefile
+++ b/tests/run-make/rustdoc-verify-output-files/Makefile
@@ -1,4 +1,4 @@
-include ../../run-make-fulldeps/tools.mk
+include ../tools.mk
OUTPUT_DIR := "$(TMPDIR)/rustdoc"
TMP_OUTPUT_DIR := "$(TMPDIR)/tmp-rustdoc"
@@ -14,7 +14,7 @@ all:
$(RUSTDOC) src/lib.rs --crate-name foobar --crate-type lib --out-dir $(OUTPUT_DIR)
# Check if everything exactly same
- $(DIFF) -r -q $(OUTPUT_DIR) $(TMP_OUTPUT_DIR)
+ $(DIFF) -r $(OUTPUT_DIR) $(TMP_OUTPUT_DIR)
# Generate json doc on the same output
$(RUSTDOC) src/lib.rs --crate-name foobar --crate-type lib --out-dir $(OUTPUT_DIR) -Z unstable-options --output-format json
@@ -22,15 +22,11 @@ all:
# Check if expected json file is generated
[ -e $(OUTPUT_DIR)/foobar.json ]
- # TODO
- # We should re-generate json doc once again and compare the diff with previously
- # generated one. Because layout of json docs changes in each compilation, we can't
- # do that currently.
- #
- # See https://github.com/rust-lang/rust/issues/103785#issuecomment-1307425590 for details.
+ # Copy first json output to check if it's exactly same after second compilation
+ cp -R $(OUTPUT_DIR)/foobar.json $(TMP_OUTPUT_DIR)/foobar.json
- # remove generated json doc
- rm $(OUTPUT_DIR)/foobar.json
+ # Generate json doc on the same output
+ $(RUSTDOC) src/lib.rs --crate-name foobar --crate-type lib --out-dir $(OUTPUT_DIR) -Z unstable-options --output-format json
- # Check if json doc compilation broke any of the html files generated previously
- $(DIFF) -r -q $(OUTPUT_DIR) $(TMP_OUTPUT_DIR)
+ # Check if all docs(including both json and html formats) are still the same after multiple compilations
+ $(DIFF) -r $(OUTPUT_DIR) $(TMP_OUTPUT_DIR)