about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-05-17 08:51:06 +0000
committerbors <bors@rust-lang.org>2024-05-17 08:51:06 +0000
commita5c37eea5aa922f4d6b543f2d35bdbd892fea2a8 (patch)
tree16b67c6bdab458df414d049ae7bbf44011a591b6
parent1189851eebdf6b69b164bbb7bf9df91188ae03aa (diff)
parent61d4f5c53bc87665c425f10e663eedf8858b032f (diff)
downloadrust-a5c37eea5aa922f4d6b543f2d35bdbd892fea2a8.tar.gz
rust-a5c37eea5aa922f4d6b543f2d35bdbd892fea2a8.zip
Auto merge of #125178 - GuillaumeGomez:migrate-rustdoc-with-out-dir, r=jieyouxu
Migrate `run-make/rustdoc-with-out-dir-option` to new `rmake.rs`

Part of https://github.com/rust-lang/rust/issues/121876.

r? `@jieyouxu`
-rw-r--r--src/tools/run-make-support/src/lib.rs2
-rw-r--r--src/tools/tidy/src/allowed_run_make_makefiles.txt1
-rw-r--r--tests/run-make/rustdoc-scrape-examples-ordering/rmake.rs2
-rw-r--r--tests/run-make/rustdoc-themes/rmake.rs2
-rw-r--r--tests/run-make/rustdoc-with-out-dir-option/Makefile8
-rw-r--r--tests/run-make/rustdoc-with-out-dir-option/rmake.rs7
6 files changed, 10 insertions, 12 deletions
diff --git a/src/tools/run-make-support/src/lib.rs b/src/tools/run-make-support/src/lib.rs
index 03b1a7efaad..9854d91e19e 100644
--- a/src/tools/run-make-support/src/lib.rs
+++ b/src/tools/run-make-support/src/lib.rs
@@ -66,7 +66,7 @@ pub fn python_command() -> Command {
 
 pub fn htmldocck() -> Command {
     let mut python = python_command();
-    python.arg(source_path().join("/src/etc/htmldocck.py"));
+    python.arg(source_path().join("src/etc/htmldocck.py"));
     python
 }
 
diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt
index 44c9616dbb1..1a3d6f8d813 100644
--- a/src/tools/tidy/src/allowed_run_make_makefiles.txt
+++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt
@@ -243,7 +243,6 @@ run-make/rustdoc-scrape-examples-remap/Makefile
 run-make/rustdoc-scrape-examples-test/Makefile
 run-make/rustdoc-scrape-examples-whitespace/Makefile
 run-make/rustdoc-verify-output-files/Makefile
-run-make/rustdoc-with-out-dir-option/Makefile
 run-make/rustdoc-with-output-option/Makefile
 run-make/rustdoc-with-short-out-dir-option/Makefile
 run-make/sanitizer-cdylib-link/Makefile
diff --git a/tests/run-make/rustdoc-scrape-examples-ordering/rmake.rs b/tests/run-make/rustdoc-scrape-examples-ordering/rmake.rs
index 08ca9ce5de8..1bc23ec8881 100644
--- a/tests/run-make/rustdoc-scrape-examples-ordering/rmake.rs
+++ b/tests/run-make/rustdoc-scrape-examples-ordering/rmake.rs
@@ -45,5 +45,5 @@ fn main() {
     }
     rustdoc.run();
 
-    htmldocck().arg(out_dir).arg("src/lib.rs").status().unwrap().success();
+    assert!(htmldocck().arg(out_dir).arg("src/lib.rs").status().unwrap().success());
 }
diff --git a/tests/run-make/rustdoc-themes/rmake.rs b/tests/run-make/rustdoc-themes/rmake.rs
index 1d7dfe6bb2a..e9da4e25940 100644
--- a/tests/run-make/rustdoc-themes/rmake.rs
+++ b/tests/run-make/rustdoc-themes/rmake.rs
@@ -27,5 +27,5 @@ fn main() {
     std::fs::write(&test_css, test_content).unwrap();
 
     rustdoc().output(&out_dir).input("foo.rs").arg("--theme").arg(&test_css).run();
-    htmldocck().arg(out_dir).arg("foo.rs").status().unwrap().success();
+    assert!(htmldocck().arg(out_dir).arg("foo.rs").status().unwrap().success());
 }
diff --git a/tests/run-make/rustdoc-with-out-dir-option/Makefile b/tests/run-make/rustdoc-with-out-dir-option/Makefile
deleted file mode 100644
index f5d5060ed13..00000000000
--- a/tests/run-make/rustdoc-with-out-dir-option/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-include ../tools.mk
-
-OUTPUT_DIR := "$(TMPDIR)/rustdoc"
-
-all:
-	$(RUSTDOC) src/lib.rs --crate-name foobar --crate-type lib --out-dir $(OUTPUT_DIR)
-
-	$(HTMLDOCCK) $(OUTPUT_DIR) src/lib.rs
diff --git a/tests/run-make/rustdoc-with-out-dir-option/rmake.rs b/tests/run-make/rustdoc-with-out-dir-option/rmake.rs
new file mode 100644
index 00000000000..86471093834
--- /dev/null
+++ b/tests/run-make/rustdoc-with-out-dir-option/rmake.rs
@@ -0,0 +1,7 @@
+use run_make_support::{htmldocck, rustdoc, tmp_dir};
+
+fn main() {
+    let out_dir = tmp_dir().join("rustdoc");
+    rustdoc().input("src/lib.rs").crate_name("foobar").crate_type("lib").output(&out_dir).run();
+    assert!(htmldocck().arg(out_dir).arg("src/lib.rs").status().unwrap().success());
+}