From 38f59a3188f44f066105ce58661fd98fbe88e3f3 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Thu, 27 Jan 2022 15:57:38 -0800 Subject: [PATCH] rustbuild: Fix compiletest warning when building outside of root. --- src/bootstrap/util.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bootstrap/util.rs b/src/bootstrap/util.rs index ee58bedcc87..2c78ceb1e5b 100644 --- a/src/bootstrap/util.rs +++ b/src/bootstrap/util.rs @@ -282,9 +282,10 @@ pub fn is_valid_test_suite_arg<'a, P: AsRef>( 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;