-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #126211 - lolbinarycat:llvm-outputs-rmake, r=jieyouxu
migrate tests/run-make/llvm-outputs to use rmake.rs part of #121876 <!-- If this PR is related to an unstable feature or an otherwise tracked effort, please link to the relevant tracking issue here. If you don't know of a related tracking issue or there are none, feel free to ignore this. This PR will get automatically assigned to a reviewer. In case you would like a specific user to review your work, you can assign it to them by using r? <reviewer name> -->
- Loading branch information
Showing
4 changed files
with
27 additions
and
6 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 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 @@ | ||
// test that directories get created when emitting llvm bitcode and IR | ||
|
||
use run_make_support::{cwd, run_in_tmpdir, rustc}; | ||
use std::path::PathBuf; | ||
|
||
fn main() { | ||
let mut path_bc = PathBuf::new(); | ||
let mut path_ir = PathBuf::new(); | ||
run_in_tmpdir(|| { | ||
let p = cwd(); | ||
path_bc = p.join("nonexistant_dir_bc"); | ||
path_ir = p.join("nonexistant_dir_ir"); | ||
rustc().input("-").stdin("fn main() {}").out_dir(&path_bc).emit("llvm-bc").run(); | ||
rustc().input("-").stdin("fn main() {}").out_dir(&path_ir).emit("llvm-ir").run(); | ||
assert!(path_bc.exists()); | ||
assert!(path_ir.exists()); | ||
}); | ||
assert!(!path_bc.exists()); | ||
assert!(!path_ir.exists()); | ||
} |