mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-17 01:13:11 +00:00
Rollup merge of #124963 - GuillaumeGomez:migrate-rustdoc-shared-flags, r=jieyouxu
Migrate `run-make/rustdoc-shared-flags` to rmake Part of https://github.com/rust-lang/rust/issues/121876. r? ```@jieyouxu```
This commit is contained in:
commit
864fce55fe
@ -252,7 +252,6 @@ run-make/rustdoc-scrape-examples-ordering/Makefile
|
||||
run-make/rustdoc-scrape-examples-remap/Makefile
|
||||
run-make/rustdoc-scrape-examples-test/Makefile
|
||||
run-make/rustdoc-scrape-examples-whitespace/Makefile
|
||||
run-make/rustdoc-shared-flags/Makefile
|
||||
run-make/rustdoc-target-spec-json-path/Makefile
|
||||
run-make/rustdoc-themes/Makefile
|
||||
run-make/rustdoc-verify-output-files/Makefile
|
||||
|
@ -1,18 +0,0 @@
|
||||
include ../tools.mk
|
||||
|
||||
all: z_help c_help list_passes
|
||||
|
||||
c_help:
|
||||
$(RUSTC) -C help > $(TMPDIR)/rustc.c_help.txt
|
||||
$(RUSTDOC) -C help > $(TMPDIR)/rustdoc.c_help.txt
|
||||
$(DIFF) $(TMPDIR)/rustc.c_help.txt $(TMPDIR)/rustdoc.c_help.txt
|
||||
|
||||
z_help:
|
||||
$(RUSTC) -Z help > $(TMPDIR)/rustc.z_help.txt
|
||||
$(RUSTDOC) -Z help > $(TMPDIR)/rustdoc.z_help.txt
|
||||
$(DIFF) $(TMPDIR)/rustc.z_help.txt $(TMPDIR)/rustdoc.z_help.txt
|
||||
|
||||
list_passes:
|
||||
$(RUSTC) -C passes=list > $(TMPDIR)/rustc.passes.txt
|
||||
$(RUSTDOC) -C passes=list > $(TMPDIR)/rustdoc.passes.txt
|
||||
$(DIFF) $(TMPDIR)/rustc.passes.txt $(TMPDIR)/rustdoc.passes.txt
|
14
tests/run-make/rustdoc-shared-flags/rmake.rs
Normal file
14
tests/run-make/rustdoc-shared-flags/rmake.rs
Normal file
@ -0,0 +1,14 @@
|
||||
use run_make_support::{rustc, rustdoc, Diff};
|
||||
|
||||
fn compare_outputs(args: &[&str]) {
|
||||
let rustc_output = String::from_utf8(rustc().args(args).command_output().stdout).unwrap();
|
||||
let rustdoc_output = String::from_utf8(rustdoc().args(args).command_output().stdout).unwrap();
|
||||
|
||||
Diff::new().expected_text("rustc", rustc_output).actual_text("rustdoc", rustdoc_output).run();
|
||||
}
|
||||
|
||||
fn main() {
|
||||
compare_outputs(&["-C", "help"]);
|
||||
compare_outputs(&["-Z", "help"]);
|
||||
compare_outputs(&["-C", "passes=list"]);
|
||||
}
|
Loading…
Reference in New Issue
Block a user