forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#127621 - Oneirical:hypnotest-show, r=<try>
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
Showing
8 changed files
with
44 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
} |