Skip to content

Commit

Permalink
Auto merge of rust-lang#127621 - Oneirical:hypnotest-show, r=<try>
Browse files Browse the repository at this point in the history
Rewrite and rename `issue-22131` and `issue-26006` `run-make` tests to rmake

Part of rust-lang#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
  • Loading branch information
bors committed Jul 12, 2024
2 parents 05eac57 + 43e1a3e commit 3cc3da9
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 27 deletions.
2 changes: 0 additions & 2 deletions src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ run-make/issue-107094/Makefile
run-make/issue-14698/Makefile
run-make/issue-15460/Makefile
run-make/issue-18943/Makefile
run-make/issue-22131/Makefile
run-make/issue-25581/Makefile
run-make/issue-26006/Makefile
run-make/issue-28595/Makefile
run-make/issue-33329/Makefile
run-make/issue-35164/Makefile
Expand Down
File renamed without changes.
File renamed without changes.
24 changes: 24 additions & 0 deletions tests/run-make/invalid-symlink-search-path/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// In this test, the symlink created is invalid (valid relative to the root, but not
// relatively to where it is located), and used to cause an internal
// compiler error (ICE) when passed as a library search path. This was fixed in #26044,
// and this test checks that the invalid symlink is instead simply ignored.
// See https://github.com/rust-lang/rust/issues/26006

//FIXME(Oneirical): try it on test-various and windows

use run_make_support::{create_symlink, fs_wrapper, rustc};

fn main() {
fs_wrapper::create_dir("out");
fs_wrapper::create_dir("out/libc");
rustc()
.input("in/libc/lib.rs")
.crate_name("libc")
.metadata("foo")
.output("out/libc/liblibc.rlib")
.run();
fs_wrapper::create_dir("out/time");
fs_wrapper::create_dir("out/time/deps");
create_symlink("out/libc/liblibc.rlib", "out/time/deps");
rustc().input("in/time/lib.rs").library_search_path("dependency=out/time/deps").run();
}
8 changes: 0 additions & 8 deletions tests/run-make/issue-22131/Makefile

This file was deleted.

17 changes: 0 additions & 17 deletions tests/run-make/issue-26006/Makefile

This file was deleted.

File renamed without changes.
20 changes: 20 additions & 0 deletions tests/run-make/rustdoc-cfgspec-parsing/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// A rustdoc bug caused the `feature=bar` syntax for the cfg flag to be interpreted
// wrongly, with `feature=bar` instead of just `bar` being understood as the feature name.
// After this was fixed in #22135, this test checks that this bug does not make a resurgence.
// See https://github.com/rust-lang/rust/issues/22131

//FIXME(Oneirical): try test-various

use run_make_support::{cwd, rustc, rustdoc};

fn main() {
rustc().cfg(r#"feature="bar""#).crate_type("lib").input("foo.rs").run();
rustdoc()
.arg("--test")
.arg("--cfg")
.arg(r#"feature="bar""#)
.library_search_path(cwd())
.input("foo.rs")
.run()
.assert_stdout_contains("foo.rs - foo (line 1) ... ok");
}

0 comments on commit 3cc3da9

Please sign in to comment.