about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2024-05-21 11:26:57 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2024-05-21 12:11:17 +0200
commitf8c992f8b481acd31cdb4c8b892696c2dd81b26e (patch)
treecc3f68824a755ba5fde5877222128a8227d33071
parent1d0e4afd4cac09078e12a232508c3e9f8d42535d (diff)
downloadrust-f8c992f8b481acd31cdb4c8b892696c2dd81b26e.tar.gz
rust-f8c992f8b481acd31cdb4c8b892696c2dd81b26e.zip
Migrate `run-make/rustdoc-scrape-examples-multiple` to `rmake.rs`
-rw-r--r--src/tools/tidy/src/allowed_run_make_makefiles.txt1
-rw-r--r--tests/run-make/rustdoc-scrape-examples-multiple/Makefile5
-rw-r--r--tests/run-make/rustdoc-scrape-examples-multiple/rmake.rs6
-rw-r--r--tests/run-make/rustdoc-scrape-examples-multiple/scrape.mk21
4 files changed, 6 insertions, 27 deletions
diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt
index 9b879f33778..001cfff143e 100644
--- a/src/tools/tidy/src/allowed_run_make_makefiles.txt
+++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt
@@ -235,7 +235,6 @@ run-make/rmeta-preferred/Makefile
 run-make/rustc-macro-dep-files/Makefile
 run-make/rustdoc-io-error/Makefile
 run-make/rustdoc-scrape-examples-macros/Makefile
-run-make/rustdoc-scrape-examples-multiple/Makefile
 run-make/rustdoc-verify-output-files/Makefile
 run-make/rustdoc-with-output-option/Makefile
 run-make/rustdoc-with-short-out-dir-option/Makefile
diff --git a/tests/run-make/rustdoc-scrape-examples-multiple/Makefile b/tests/run-make/rustdoc-scrape-examples-multiple/Makefile
deleted file mode 100644
index 453a7d4bc8b..00000000000
--- a/tests/run-make/rustdoc-scrape-examples-multiple/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-deps := ex ex2
-
-include ./scrape.mk
-
-all: scrape
diff --git a/tests/run-make/rustdoc-scrape-examples-multiple/rmake.rs b/tests/run-make/rustdoc-scrape-examples-multiple/rmake.rs
new file mode 100644
index 00000000000..e9c54fa3922
--- /dev/null
+++ b/tests/run-make/rustdoc-scrape-examples-multiple/rmake.rs
@@ -0,0 +1,6 @@
+#[path = "../rustdoc-scrape-examples-remap/scrape.rs"]
+mod scrape;
+
+fn main() {
+    scrape::scrape(&[]);
+}
diff --git a/tests/run-make/rustdoc-scrape-examples-multiple/scrape.mk b/tests/run-make/rustdoc-scrape-examples-multiple/scrape.mk
deleted file mode 100644
index 57220bc6635..00000000000
--- a/tests/run-make/rustdoc-scrape-examples-multiple/scrape.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-include ../tools.mk
-
-OUTPUT_DIR := "$(TMPDIR)/rustdoc"
-
-$(TMPDIR)/%.calls: $(TMPDIR)/libfoobar.rmeta
-	$(RUSTDOC) examples/$*.rs --crate-name $* --crate-type bin --output $(OUTPUT_DIR) \
-	  --extern foobar=$(TMPDIR)/libfoobar.rmeta \
-		-Z unstable-options \
-		--scrape-examples-output-path $@ \
-		--scrape-examples-target-crate foobar \
-		$(extra_flags)
-
-$(TMPDIR)/lib%.rmeta: src/lib.rs
-	$(RUSTC) src/lib.rs --crate-name $* --crate-type lib --emit=metadata
-
-scrape: $(foreach d,$(deps),$(TMPDIR)/$(d).calls)
-	$(RUSTDOC) src/lib.rs --crate-name foobar --crate-type lib --output $(OUTPUT_DIR) \
-		-Z unstable-options \
-		$(foreach d,$(deps),--with-examples $(TMPDIR)/$(d).calls)
-
-	$(HTMLDOCCK) $(OUTPUT_DIR) src/lib.rs