diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt index b23a6cb85c0..e2ebdbca281 100644 --- a/src/tools/tidy/src/allowed_run_make_makefiles.txt +++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt @@ -98,7 +98,6 @@ run-make/lto-smoke-c/Makefile run-make/macos-deployment-target/Makefile run-make/macos-fat-archive/Makefile run-make/manual-link/Makefile -run-make/metadata-dep-info/Makefile run-make/min-global-align/Makefile run-make/mingw-export-call-convention/Makefile run-make/mismatching-target-triples/Makefile diff --git a/tests/run-make/metadata-dep-info/Makefile b/tests/run-make/metadata-dep-info/Makefile deleted file mode 100644 index d48cbe0f295..00000000000 --- a/tests/run-make/metadata-dep-info/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -include ../tools.mk - -all: - $(RUSTC) --emit=metadata,dep-info --crate-type lib dash-separated.rs -C extra-filename=_something-extra - # Strip TMPDIR since it is a machine specific absolute path - sed "s%.*[/\\]%%" "$(TMPDIR)"/dash-separated_something-extra.d > "$(TMPDIR)"/dash-separated_something-extra.normalized.d - $(RUSTC_TEST_OP) "$(TMPDIR)"/dash-separated_something-extra.normalized.d dash-separated_something-extra.normalized.d diff --git a/tests/run-make/metadata-dep-info/dash-separated_something-extra.normalized.d b/tests/run-make/metadata-dep-info/dash-separated_something-extra.expected.d similarity index 100% rename from tests/run-make/metadata-dep-info/dash-separated_something-extra.normalized.d rename to tests/run-make/metadata-dep-info/dash-separated_something-extra.expected.d diff --git a/tests/run-make/metadata-dep-info/rmake.rs b/tests/run-make/metadata-dep-info/rmake.rs new file mode 100644 index 00000000000..f4bb3ea63fb --- /dev/null +++ b/tests/run-make/metadata-dep-info/rmake.rs @@ -0,0 +1,20 @@ +// Emitting dep-info alongside metadata would present subtle discrepancies +// in the output file, such as the filename transforming underscores_ into hyphens-. +// After the fix in #114750, this test checks that the emitted files are identical +// to the expected output. +// See https://github.com/rust-lang/rust/issues/68839 + +use run_make_support::{diff, rustc}; + +fn main() { + rustc() + .emit("metadata,dep-info") + .crate_type("lib") + .input("dash-separated.rs") + .extra_filename("_something-extra") + .run(); + diff() + .expected_file("dash-separated_something-extra.expected.d") + .actual_file("dash-separated_something-extra.d") + .run(); +}