Skip to content

Commit

Permalink
rewrite compiler-lookup-paths-2 to rmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed Jul 19, 2024
1 parent 2733494 commit 2192a91
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 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 @@ -6,7 +6,6 @@ run-make/c-static-rlib/Makefile
run-make/c-unwind-abi-catch-lib-panic/Makefile
run-make/cat-and-grep-sanity-check/Makefile
run-make/cdylib-dylib-linkage/Makefile
run-make/compiler-lookup-paths-2/Makefile
run-make/compiler-rt-works-on-mingw/Makefile
run-make/crate-hash-rustc-version/Makefile
run-make/cross-lang-lto-clang/Makefile
Expand Down
11 changes: 0 additions & 11 deletions tests/run-make/compiler-lookup-paths-2/Makefile

This file was deleted.

20 changes: 20 additions & 0 deletions tests/run-make/compiler-lookup-paths-2/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// This test checks that extern crate declarations in Cargo without a corresponding declaration
// in the manifest of a dependency are NOT allowed. The last rustc call does it anyways, which
// should result in a compilation failure.
// See https://github.com/rust-lang/rust/pull/21113

use run_make_support::{path, rfs, rust_lib_name, rustc};

fn main() {
rfs::create_dir("a");
rfs::create_dir("b");
rustc().input("a.rs").run();
rfs::rename(rust_lib_name("a"), path("a").join(rust_lib_name("a")));
rustc().input("b.rs").library_search_path("a").run();
rfs::rename(rust_lib_name("b"), path("b").join(rust_lib_name("b")));
rustc()
.input("c.rs")
.library_search_path("crate=b")
.library_search_path("dependency=a")
.run_fail();
}
1 change: 1 addition & 0 deletions tests/run-make/test-benches/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use run_make_support::{run, run_with_args, rustc};

fn main() {
// Smoke-test that #[bench] isn't entirely broken.
rustc().arg("--test").input("smokebench.rs").opt().run();
run_with_args("smokebench", &["--bench"]);
run_with_args("smokebench", &["--bench", "noiter"]);
Expand Down

0 comments on commit 2192a91

Please sign in to comment.