-
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.
migrate tests/run-make/llvm-outputs to use rmake.rs
part of #121876
- Loading branch information
1 parent
503dfcf
commit 6c0aea5
Showing
2 changed files
with
22 additions
and
5 deletions.
There are no files selected for viewing
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,22 @@ | ||
// test that directories get created when emitting llvm bitcode and IR | ||
|
||
use run_make_support::{rustc, run_in_tmpdir, cwd}; | ||
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).arg("--emit=llvm-bc").run(); | ||
rustc().input("-").stdin("fn main() {}") | ||
.out_dir(&path_ir).arg("--emit=llvm-ir").run(); | ||
assert!(path_bc.exists()); | ||
assert!(path_ir.exists()); | ||
}); | ||
assert!(!path_bc.exists()); | ||
assert!(!path_ir.exists()); | ||
} |