Skip to content

Commit 38f59a3

Browse files
committed
rustbuild: Fix compiletest warning when building outside of root.
1 parent 21b4a9c commit 38f59a3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/bootstrap/util.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,10 @@ pub fn is_valid_test_suite_arg<'a, P: AsRef<Path>>(
282282
if !path.starts_with(suite_path) {
283283
return None;
284284
}
285-
let exists = path.is_dir() || path.is_file();
285+
let abs_path = builder.src.join(path);
286+
let exists = abs_path.is_dir() || abs_path.is_file();
286287
if !exists {
287-
if let Some(p) = path.to_str() {
288+
if let Some(p) = abs_path.to_str() {
288289
builder.info(&format!("Warning: Skipping \"{}\": not a regular file or directory", p));
289290
}
290291
return None;

0 commit comments

Comments
 (0)