diff options
| author | Serial <69764315+Serial-ATA@users.noreply.github.com> | 2022-08-16 17:17:21 -0400 |
|---|---|---|
| committer | Serial <69764315+Serial-ATA@users.noreply.github.com> | 2022-08-16 17:17:21 -0400 |
| commit | 343476df0f8cd09e1b49063ba75cb42304336887 (patch) | |
| tree | 5fdd28ae18f5ae4a4dd4d42e19a75c8ea66685e6 | |
| parent | 048e4d004aa2335393b805d690035ff3db5549c9 (diff) | |
| download | rust-343476df0f8cd09e1b49063ba75cb42304336887.tar.gz rust-343476df0f8cd09e1b49063ba75cb42304336887.zip | |
Use `CARGO_TARGET_DIR` in compile-test
| -rw-r--r-- | tests/compile-test.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/compile-test.rs b/tests/compile-test.rs index 610f1f14563..6ef90c030b7 100644 --- a/tests/compile-test.rs +++ b/tests/compile-test.rs @@ -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)); |
