Skip to content

Commit

Permalink
Use CARGO_TARGET_DIR in compile-test
Browse files Browse the repository at this point in the history
  • Loading branch information
Serial-ATA committed Aug 16, 2022
1 parent 048e4d0 commit 343476d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/compile-test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,8 @@ const RUSTFIX_COVERAGE_KNOWN_EXCEPTIONS: &[&str] = &[
];

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) {
assert!(RUSTFIX_COVERAGE_KNOWN_EXCEPTIONS.iter().is_sorted_by_key(Path::new));
Expand Down

0 comments on commit 343476d

Please sign in to comment.