Auto merge of #9343 - Serial-ATA:compiletest-target-env, r=Manishearth
Use `CARGO_TARGET_DIR` in compile-test
changelog: none
I have a global `CARGO_TARGET_DIR` set, but forgot to delete the old target dir. `compile-test` was getting tripped up on an outdated `rustfix_missing_coverage.txt` I had in there, keeping me from running tests 😄.
This commit is contained in:
commit
a3317662f2
@ -403,7 +403,8 @@ fn compile_test() {
|
|||||||
];
|
];
|
||||||
|
|
||||||
fn check_rustfix_coverage() {
|
fn check_rustfix_coverage() {
|
||||||
let missing_coverage_path = Path::new("target/debug/test/ui/rustfix_missing_coverage.txt");
|
let target_dir = PathBuf::from(std::env::var("CARGO_TARGET_DIR").unwrap());
|
||||||
|
let missing_coverage_path = target_dir.join("debug/test/ui/rustfix_missing_coverage.txt");
|
||||||
|
|
||||||
if let Ok(missing_coverage_contents) = std::fs::read_to_string(missing_coverage_path) {
|
if let Ok(missing_coverage_contents) = std::fs::read_to_string(missing_coverage_path) {
|
||||||
assert!(RUSTFIX_COVERAGE_KNOWN_EXCEPTIONS.iter().is_sorted_by_key(Path::new));
|
assert!(RUSTFIX_COVERAGE_KNOWN_EXCEPTIONS.iter().is_sorted_by_key(Path::new));
|
||||||
|
Loading…
Reference in New Issue
Block a user