mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
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`
This commit is contained in:
commit
a5c37eea5a
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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());
|
||||
}
|
||||
|
@ -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());
|
||||
}
|
||||
|
@ -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
|
7
tests/run-make/rustdoc-with-out-dir-option/rmake.rs
Normal file
7
tests/run-make/rustdoc-with-out-dir-option/rmake.rs
Normal file
@ -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());
|
||||
}
|
Loading…
Reference in New Issue
Block a user