mirror of https://github.com/rust-lang/rust.git
Rollup merge of #125445 - GuillaumeGomez:rustdoc-migrate-short-out-dir, r=jieyouxu
Migrate `run-make/rustdoc-with-short-out-dir-option` to `rmake.rs` Part of https://github.com/rust-lang/rust/issues/121876. r? `@jieyouxu`
This commit is contained in:
commit
0de052acd8
|
@ -229,7 +229,6 @@ run-make/rustc-macro-dep-files/Makefile
|
||||||
run-make/rustdoc-io-error/Makefile
|
run-make/rustdoc-io-error/Makefile
|
||||||
run-make/rustdoc-verify-output-files/Makefile
|
run-make/rustdoc-verify-output-files/Makefile
|
||||||
run-make/rustdoc-with-output-option/Makefile
|
run-make/rustdoc-with-output-option/Makefile
|
||||||
run-make/rustdoc-with-short-out-dir-option/Makefile
|
|
||||||
run-make/sanitizer-cdylib-link/Makefile
|
run-make/sanitizer-cdylib-link/Makefile
|
||||||
run-make/sanitizer-dylib-link/Makefile
|
run-make/sanitizer-dylib-link/Makefile
|
||||||
run-make/sanitizer-staticlib-link/Makefile
|
run-make/sanitizer-staticlib-link/Makefile
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
include ../tools.mk
|
|
||||||
|
|
||||||
OUTPUT_DIR := "$(TMPDIR)/rustdoc"
|
|
||||||
|
|
||||||
all:
|
|
||||||
$(RUSTDOC) src/lib.rs --crate-name foobar --crate-type lib -o $(OUTPUT_DIR)
|
|
||||||
|
|
||||||
$(HTMLDOCCK) $(OUTPUT_DIR) src/lib.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 `-o` option flag and not the `output()` method.
|
||||||
|
.arg("-o")
|
||||||
|
.arg(&out_dir)
|
||||||
|
.run();
|
||||||
|
|
||||||
|
assert!(htmldocck().arg(out_dir).arg("src/lib.rs").status().unwrap().success());
|
||||||
|
}
|
Loading…
Reference in New Issue