about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2024-05-24 11:19:30 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2024-05-24 11:19:30 +0200
commitdaff84372d67fe39e13b35fdcd3f6f4267a0063a (patch)
tree0274733383c704ff7048c547ac18960dc726d311
parent7c547894c76efe9303caa3108754674c39bd901d (diff)
downloadrust-daff84372d67fe39e13b35fdcd3f6f4267a0063a.tar.gz
rust-daff84372d67fe39e13b35fdcd3f6f4267a0063a.zip
Migrate `run-make/rustdoc-with-output-dir-option` to `rmake.rs`
-rw-r--r--src/tools/tidy/src/allowed_run_make_makefiles.txt1
-rw-r--r--tests/run-make/rustdoc-with-output-option/Makefile8
-rw-r--r--tests/run-make/rustdoc-with-output-option/rmake.rs16
3 files changed, 16 insertions, 9 deletions
diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt
index ad900ce0386..9a6ae18abea 100644
--- a/src/tools/tidy/src/allowed_run_make_makefiles.txt
+++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt
@@ -228,7 +228,6 @@ run-make/rmeta-preferred/Makefile
 run-make/rustc-macro-dep-files/Makefile
 run-make/rustdoc-io-error/Makefile
 run-make/rustdoc-verify-output-files/Makefile
-run-make/rustdoc-with-output-option/Makefile
 run-make/sanitizer-cdylib-link/Makefile
 run-make/sanitizer-dylib-link/Makefile
 run-make/sanitizer-staticlib-link/Makefile
diff --git a/tests/run-make/rustdoc-with-output-option/Makefile b/tests/run-make/rustdoc-with-output-option/Makefile
deleted file mode 100644
index d0a8205a8ee..00000000000
--- a/tests/run-make/rustdoc-with-output-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 --output $(OUTPUT_DIR)
-
-	$(HTMLDOCCK) $(OUTPUT_DIR) src/lib.rs
diff --git a/tests/run-make/rustdoc-with-output-option/rmake.rs b/tests/run-make/rustdoc-with-output-option/rmake.rs
new file mode 100644
index 00000000000..1a009419273
--- /dev/null
+++ b/tests/run-make/rustdoc-with-output-option/rmake.rs
@@ -0,0 +1,16 @@
+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")
+        // This is intentionally using `--output` option flag and not the `output()` method.
+        .arg("--output")
+        .arg(&out_dir)
+        .run();
+
+    assert!(htmldocck().arg(out_dir).arg("src/lib.rs").status().unwrap().success());
+}