about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-05-27 13:10:37 +0200
committerGitHub <noreply@github.com>2024-05-27 13:10:37 +0200
commit7083131c92dd4dcbfc23216cd7eb8d7fac93fcaf (patch)
treebeb7994389fff4d18305dce5f5c22d21b1c65074
parenta9c125f8642157976c5c85c3637f21426dac4846 (diff)
parente4abfaeb620e75a1f84b94dcb89e41eac495f52b (diff)
downloadrust-7083131c92dd4dcbfc23216cd7eb8d7fac93fcaf.tar.gz
rust-7083131c92dd4dcbfc23216cd7eb8d7fac93fcaf.zip
Rollup merge of #125607 - GuillaumeGomez:migrate-compile-stdin, r=jieyouxu
Migrate `run-make/compile-stdin` to `rmake.rs`

Part of https://github.com/rust-lang/rust/issues/121876.

r? `@jieyouxu`
-rw-r--r--src/tools/tidy/src/allowed_run_make_makefiles.txt1
-rw-r--r--tests/run-make/compile-stdin/Makefile9
-rw-r--r--tests/run-make/compile-stdin/rmake.rs13
3 files changed, 13 insertions, 10 deletions
diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt
index 9a6ae18abea..55d65fe8987 100644
--- a/src/tools/tidy/src/allowed_run_make_makefiles.txt
+++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt
@@ -18,7 +18,6 @@ run-make/cdylib-fewer-symbols/Makefile
 run-make/cdylib/Makefile
 run-make/codegen-options-parsing/Makefile
 run-make/comment-section/Makefile
-run-make/compile-stdin/Makefile
 run-make/compiler-lookup-paths-2/Makefile
 run-make/compiler-lookup-paths/Makefile
 run-make/compiler-rt-works-on-mingw/Makefile
diff --git a/tests/run-make/compile-stdin/Makefile b/tests/run-make/compile-stdin/Makefile
deleted file mode 100644
index b3d7cc777a0..00000000000
--- a/tests/run-make/compile-stdin/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# When provided standard input piped directly into rustc, this test checks that the compilation completes successfully and that the output can be executed.
-# See https://github.com/rust-lang/rust/pull/28805
-
-# ignore-cross-compile
-include ../tools.mk
-
-all:
-	echo 'fn main(){}' | $(RUSTC) -
-	$(call RUN,rust_out)
diff --git a/tests/run-make/compile-stdin/rmake.rs b/tests/run-make/compile-stdin/rmake.rs
new file mode 100644
index 00000000000..f93080dfdc4
--- /dev/null
+++ b/tests/run-make/compile-stdin/rmake.rs
@@ -0,0 +1,13 @@
+// When provided standard input piped directly into rustc, this test checks that the compilation
+// completes successfully and that the output can be executed.
+//
+// See <https://github.com/rust-lang/rust/pull/28805>.
+
+//@ ignore-cross-compile
+
+use run_make_support::{run, rustc};
+
+fn main() {
+    rustc().arg("-").stdin("fn main() {}").run();
+    run("rust_out");
+}