Skip to content

Commit 3cc3da9

Browse files
committed
Auto merge of #127621 - Oneirical:hypnotest-show, r=<try>
Rewrite and rename `issue-22131` and `issue-26006` `run-make` tests to rmake Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html). Please try: try-job: x86_64-msvc try-job: test-various
2 parents 05eac57 + 43e1a3e commit 3cc3da9

File tree

8 files changed

+44
-27
lines changed

8 files changed

+44
-27
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-2
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ run-make/issue-107094/Makefile
4949
run-make/issue-14698/Makefile
5050
run-make/issue-15460/Makefile
5151
run-make/issue-18943/Makefile
52-
run-make/issue-22131/Makefile
5352
run-make/issue-25581/Makefile
54-
run-make/issue-26006/Makefile
5553
run-make/issue-28595/Makefile
5654
run-make/issue-33329/Makefile
5755
run-make/issue-35164/Makefile
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
//FIXME(Oneirical): try it on test-various and windows
8+
9+
use run_make_support::{create_symlink, fs_wrapper, rustc};
10+
11+
fn main() {
12+
fs_wrapper::create_dir("out");
13+
fs_wrapper::create_dir("out/libc");
14+
rustc()
15+
.input("in/libc/lib.rs")
16+
.crate_name("libc")
17+
.metadata("foo")
18+
.output("out/libc/liblibc.rlib")
19+
.run();
20+
fs_wrapper::create_dir("out/time");
21+
fs_wrapper::create_dir("out/time/deps");
22+
create_symlink("out/libc/liblibc.rlib", "out/time/deps");
23+
rustc().input("in/time/lib.rs").library_search_path("dependency=out/time/deps").run();
24+
}

tests/run-make/issue-22131/Makefile

-8
This file was deleted.

tests/run-make/issue-26006/Makefile

-17
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// A rustdoc bug caused the `feature=bar` syntax for the cfg flag to be interpreted
2+
// wrongly, with `feature=bar` instead of just `bar` being understood as the feature name.
3+
// After this was fixed in #22135, this test checks that this bug does not make a resurgence.
4+
// See https://github.com/rust-lang/rust/issues/22131
5+
6+
//FIXME(Oneirical): try test-various
7+
8+
use run_make_support::{cwd, rustc, rustdoc};
9+
10+
fn main() {
11+
rustc().cfg(r#"feature="bar""#).crate_type("lib").input("foo.rs").run();
12+
rustdoc()
13+
.arg("--test")
14+
.arg("--cfg")
15+
.arg(r#"feature="bar""#)
16+
.library_search_path(cwd())
17+
.input("foo.rs")
18+
.run()
19+
.assert_stdout_contains("foo.rs - foo (line 1) ... ok");
20+
}

0 commit comments

Comments
 (0)