-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate
tests/run-make/prefer-dylib
to rmake.rs
- Loading branch information
1 parent
f21554f
commit b2c1a95
Showing
3 changed files
with
20 additions
and
10 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
This file was deleted.
Oops, something went wrong.
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 @@ | ||
//@ ignore-cross-compile | ||
|
||
use run_make_support::{cwd, read_dir, run, run_fail, rustc}; | ||
use std::fs::remove_file; | ||
use std::process::Command; | ||
|
||
fn main() { | ||
rustc().input("bar.rs").crate_type("dylib").crate_type("rlib").arg("-Cprefer-dynamic").run(); | ||
rustc().input("foo.rs").arg("-Cprefer-dynamic").run(); | ||
|
||
run("foo"); | ||
|
||
read_dir(cwd(), |path| { | ||
if !path.is_dir() && path.file_name().unwrap().to_str().unwrap().contains("bar") { | ||
remove_file(path).unwrap(); | ||
} | ||
}); | ||
// This time the command should fail. | ||
run_fail("foo"); | ||
} |