Skip to content

Commit

Permalink
rustbuild: Fix compiletest warning when building outside of root.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Jan 27, 2022
1 parent 21b4a9c commit 38f59a3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/bootstrap/util.rs
Expand Up @@ -282,9 +282,10 @@ pub fn is_valid_test_suite_arg<'a, P: AsRef<Path>>(
if !path.starts_with(suite_path) {
return None;
}
let exists = path.is_dir() || path.is_file();
let abs_path = builder.src.join(path);
let exists = abs_path.is_dir() || abs_path.is_file();
if !exists {
if let Some(p) = path.to_str() {
if let Some(p) = abs_path.to_str() {
builder.info(&format!("Warning: Skipping \"{}\": not a regular file or directory", p));
}
return None;
Expand Down

0 comments on commit 38f59a3

Please sign in to comment.