Skip to content

Commit fe2406b

Browse files
committed
rewrite invalid-so to rmake
1 parent 6ba0a84 commit fe2406b

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ run-make/incr-foreign-head-span/Makefile
5555
run-make/interdependent-c-libraries/Makefile
5656
run-make/intrinsic-unreachable/Makefile
5757
run-make/invalid-library/Makefile
58-
run-make/invalid-so/Makefile
5958
run-make/issue-107094/Makefile
6059
run-make/issue-109934-lto-debuginfo/Makefile
6160
run-make/issue-14698/Makefile

tests/run-make/invalid-so/Makefile

-7
This file was deleted.

tests/run-make/invalid-so/rmake.rs

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// When a fake library was given to the compiler, it would
2+
// result in an obscure and unhelpful error message. This test
3+
// creates a false "foo" dylib, and checks that the standard error
4+
// explains that the file exists, but that its metadata is incorrect.
5+
// See https://github.com/rust-lang/rust/pull/88368
6+
7+
use run_make_support::{dynamic_lib_name, fs_wrapper, rustc};
8+
9+
fn main() {
10+
fs_wrapper::create_file(dynamic_lib_name("foo"));
11+
rustc()
12+
.crate_type("lib")
13+
.extern_("foo", dynamic_lib_name("foo"))
14+
.input("bar.rs")
15+
.run_fail()
16+
.assert_stderr_contains("invalid metadata files for crate `foo`");
17+
}

0 commit comments

Comments
 (0)