mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
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).
This commit is contained in:
commit
7ef533bce6
@ -177,7 +177,6 @@ run-make/no-alloc-shim/Makefile
|
||||
run-make/no-builtins-attribute/Makefile
|
||||
run-make/no-builtins-lto/Makefile
|
||||
run-make/no-duplicate-libs/Makefile
|
||||
run-make/no-intermediate-extras/Makefile
|
||||
run-make/obey-crate-type-flag/Makefile
|
||||
run-make/optimization-remarks-dir-pgo/Makefile
|
||||
run-make/optimization-remarks-dir/Makefile
|
||||
|
@ -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
|
17
tests/run-make/no-intermediate-extras/rmake.rs
Normal file
17
tests/run-make/no-intermediate-extras/rmake.rs
Normal file
@ -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."
|
||||
);
|
||||
}
|
Loading…
Reference in New Issue
Block a user