From 0e498d5463151a7278655f9960e90ae5ead3adc1 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 7 Jun 2024 15:16:10 +0200 Subject: [PATCH] Migrate `run-make/link-arg` to `rmake.rs` --- src/tools/tidy/src/allowed_run_make_makefiles.txt | 1 - tests/run-make/link-arg/Makefile | 5 ----- tests/run-make/link-arg/rmake.rs | 13 +++++++++++++ 3 files changed, 13 insertions(+), 6 deletions(-) delete mode 100644 tests/run-make/link-arg/Makefile create mode 100644 tests/run-make/link-arg/rmake.rs diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt index a015f96ae51d8..0286e0d6c4d90 100644 --- a/src/tools/tidy/src/allowed_run_make_makefiles.txt +++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt @@ -114,7 +114,6 @@ run-make/libtest-json/Makefile run-make/libtest-junit/Makefile run-make/libtest-padding/Makefile run-make/libtest-thread-limit/Makefile -run-make/link-arg/Makefile run-make/link-args-order/Makefile run-make/link-cfg/Makefile run-make/link-dedup/Makefile diff --git a/tests/run-make/link-arg/Makefile b/tests/run-make/link-arg/Makefile deleted file mode 100644 index 103527c3e14d9..0000000000000 --- a/tests/run-make/link-arg/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -include ../tools.mk -RUSTC_FLAGS = -C link-arg="-lfoo" -C link-arg="-lbar" --print link-args - -all: - $(RUSTC) $(RUSTC_FLAGS) empty.rs | $(CGREP) lfoo lbar diff --git a/tests/run-make/link-arg/rmake.rs b/tests/run-make/link-arg/rmake.rs new file mode 100644 index 0000000000000..9b53047dca95f --- /dev/null +++ b/tests/run-make/link-arg/rmake.rs @@ -0,0 +1,13 @@ +use run_make_support::{rustc, tmp_dir}; + +fn main() { + let out = rustc() + .link_arg("-lfoo") + .link_arg("-lbar") + .print("link-args") + .input("empty.rs") + .command_output(); + let out = String::from_utf8(out.stdout).unwrap(); + assert!(out.contains("lfoo"), "output doesn't contain `lfoo`"); + assert!(out.contains("lbar"), "output doesn't contain `lbar`"); +}