Skip to content

Commit fc4404c

Browse files
committed
Rewrite and rename issue-26006 to rmake
1 parent 9dc08e3 commit fc4404c

File tree

8 files changed

+45
-27
lines changed

8 files changed

+45
-27
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ run-make/interdependent-c-libraries/Makefile
3838
run-make/issue-107094/Makefile
3939
run-make/issue-14698/Makefile
4040
run-make/issue-15460/Makefile
41-
run-make/issue-26006/Makefile
4241
run-make/issue-28595/Makefile
4342
run-make/issue-33329/Makefile
4443
run-make/issue-35164/Makefile
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
extern crate foo;
2+
3+
pub fn main() {
4+
let _ = foo::hello_world();
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pub fn hello_world() -> i32 {
2+
42
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// In this test, the symlink created is invalid (valid relative to the root, but not
2+
// relatively to where it is located), and used to cause an internal
3+
// compiler error (ICE) when passed as a library search path. This was fixed in #26044,
4+
// and this test checks that the invalid symlink is instead simply ignored.
5+
// See https://github.com/rust-lang/rust/issues/26006
6+
7+
//@ needs-symlink
8+
//Reason: symlink requires elevated permission in Windows
9+
10+
use run_make_support::{rfs, rustc};
11+
12+
fn main() {
13+
// We create two libs: `bar` which depends on `foo`. We need to compile `foo` first.
14+
rfs::create_dir("out");
15+
rfs::create_dir("out/foo");
16+
rustc()
17+
.input("in/foo/lib.rs")
18+
.crate_name("foo")
19+
.crate_type("lib")
20+
.metadata("foo")
21+
.output("out/foo/libfoo.rlib")
22+
.run();
23+
rfs::create_dir("out/bar");
24+
rfs::create_dir("out/bar/deps");
25+
rfs::create_symlink("out/foo/libfoo.rlib", "out/bar/deps/libfoo.rlib");
26+
// Check that the invalid symlink does not cause an ICE
27+
rustc()
28+
.input("in/bar/lib.rs")
29+
.library_search_path("dependency=out/bar/deps")
30+
.run_fail()
31+
.assert_exit_code(1)
32+
.assert_stderr_not_contains("internal compiler error");
33+
}

tests/run-make/issue-26006/Makefile

-17
This file was deleted.

tests/run-make/issue-26006/in/libc/lib.rs

-3
This file was deleted.

tests/run-make/issue-26006/in/time/lib.rs

-4
This file was deleted.

tests/run-make/rustdoc-cfgspec-parsing/rmake.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@
33
// After this was fixed in #22135, this test checks that this bug does not make a resurgence.
44
// See https://github.com/rust-lang/rust/issues/22131
55

6-
//FIXME(Oneirical): try test-various
6+
//@ ignore-cross-compile
7+
// Reason: rustdoc fails to find the "foo" crate
78

8-
use run_make_support::{rustc, rustdoc};
9+
use run_make_support::{cwd, rustc, rustdoc};
910

1011
fn main() {
1112
rustc().cfg(r#"feature="bar""#).crate_type("lib").input("foo.rs").run();
1213
rustdoc()
1314
.arg("--test")
1415
.arg("--cfg")
1516
.arg(r#"feature="bar""#)
17+
.library_search_path(cwd())
1618
.input("foo.rs")
1719
.run()
1820
.assert_stdout_contains("foo.rs - foo (line 1) ... ok");

0 commit comments

Comments
 (0)