diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt index 79b3f4b8295..118e76fdbcd 100644 --- a/src/tools/tidy/src/allowed_run_make_makefiles.txt +++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt @@ -158,7 +158,6 @@ run-make/target-without-atomic-cas/Makefile run-make/test-benches/Makefile run-make/thumb-none-cortex-m/Makefile run-make/thumb-none-qemu/Makefile -run-make/track-path-dep-info/Makefile run-make/track-pgo-dep-info/Makefile run-make/translation/Makefile run-make/type-mismatch-same-crate-name/Makefile diff --git a/tests/run-make/track-path-dep-info/Makefile b/tests/run-make/track-path-dep-info/Makefile deleted file mode 100644 index 0d6c9b1d2f0..00000000000 --- a/tests/run-make/track-path-dep-info/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -include ../tools.mk - -# FIXME(eddyb) provide `HOST_RUSTC` and `TARGET_RUSTC` -# instead of hardcoding them everywhere they're needed. -ifeq ($(IS_MUSL_HOST),1) -ADDITIONAL_ARGS := $(RUSTFLAGS) -endif - -all: - # Proc macro - $(BARE_RUSTC) $(ADDITIONAL_ARGS) --out-dir $(TMPDIR) macro_def.rs - EXISTING_PROC_MACRO_ENV=1 $(RUSTC) --emit dep-info macro_use.rs - $(CGREP) "emojis.txt:" < $(TMPDIR)/macro_use.d diff --git a/tests/run-make/track-path-dep-info/rmake.rs b/tests/run-make/track-path-dep-info/rmake.rs new file mode 100644 index 00000000000..f4a77c7fc21 --- /dev/null +++ b/tests/run-make/track-path-dep-info/rmake.rs @@ -0,0 +1,15 @@ +// This test checks the functionality of `tracked_path::path`, a procedural macro +// feature that adds a dependency to another file inside the procmacro. In this case, +// the text file is added through this method, and the test checks that the compilation +// output successfully added the file as a dependency. +// See https://github.com/rust-lang/rust/pull/84029 + +//FIXME(Oneirical): Try it on musl + +use run_make_support::{bare_rustc, fs_wrapper, rustc}; + +fn main() { + bare_rustc().input("macro_def.rs").run(); + rustc().env("EXISTING_PROC_MACRO_ENV", "1").emit("dep-info").input("macro_use.rs").run(); + assert!(fs_wrapper::read_to_string("macro_use.d").contains("emojis.txt:")); +}