diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-05-21 12:47:05 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-21 12:47:05 +0200 |
| commit | 7ef533bce604bfbf829953daea5dfef5fb85fa5d (patch) | |
| tree | 4c266f75d4408b4511c64d474f82ea60016d792c /tests | |
| parent | 4abf179b1471c0bf332ffca6c39425d7fb8feab1 (diff) | |
| parent | 95c47d3396c324b32ffaedc2681a370107aeb6be (diff) | |
| download | rust-7ef533bce604bfbf829953daea5dfef5fb85fa5d.tar.gz rust-7ef533bce604bfbf829953daea5dfef5fb85fa5d.zip | |
Rollup merge of #125218 - Oneirical:easy-test-the-third, r=jieyouxu
Migrate `run-make/no-intermediate-extras` to new `rmake.rs` Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/run-make/no-intermediate-extras/Makefile | 8 | ||||
| -rw-r--r-- | tests/run-make/no-intermediate-extras/rmake.rs | 17 |
2 files changed, 17 insertions, 8 deletions
diff --git a/tests/run-make/no-intermediate-extras/Makefile b/tests/run-make/no-intermediate-extras/Makefile deleted file mode 100644 index 83b5cedcf2a..00000000000 --- a/tests/run-make/no-intermediate-extras/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# ignore-cross-compile -# Regression test for issue #10973 - -include ../tools.mk - -all: - $(RUSTC) --crate-type=rlib --test foo.rs - rm $(TMPDIR)/foo.bc && exit 1 || exit 0 diff --git a/tests/run-make/no-intermediate-extras/rmake.rs b/tests/run-make/no-intermediate-extras/rmake.rs new file mode 100644 index 00000000000..19479e3bd5b --- /dev/null +++ b/tests/run-make/no-intermediate-extras/rmake.rs @@ -0,0 +1,17 @@ +// When using the --test flag with an rlib, this used to generate +// an unwanted .bc file, which should not exist. This test checks +// that the bug causing the generation of this file has not returned. +// See https://github.com/rust-lang/rust/issues/10973 + +//@ ignore-cross-compile + +use run_make_support::{rustc, tmp_dir}; +use std::fs; + +fn main() { + rustc().crate_type("rlib").arg("--test").input("foo.rs").run(); + assert!( + fs::remove_file(tmp_dir().join("foo.bc")).is_err(), + "An unwanted .bc file was created by run-make/no-intermediate-extras." + ); +} |
