Skip to content

Commit

Permalink
Rewrite and rename issue-26006 to rmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed Jul 11, 2024
1 parent 6f24454 commit 43e1a3e
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 19 deletions.
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ run-make/issue-14698/Makefile
run-make/issue-15460/Makefile
run-make/issue-18943/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();
}
17 changes: 0 additions & 17 deletions tests/run-make/issue-26006/Makefile

This file was deleted.

3 changes: 2 additions & 1 deletion tests/run-make/rustdoc-cfgspec-parsing/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@

//FIXME(Oneirical): try test-various

use run_make_support::{rustc, rustdoc};
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");
Expand Down

0 comments on commit 43e1a3e

Please sign in to comment.