diff options
| author | Dániel Buga <bugadani@gmail.com> | 2021-01-04 16:09:59 +0100 |
|---|---|---|
| committer | Dániel Buga <bugadani@gmail.com> | 2021-01-04 16:09:59 +0100 |
| commit | 6002e78392541b61055f1fd32cbf310ac4409a88 (patch) | |
| tree | 018515c00b1634e33c9ea06abdcdd65fd800432e | |
| parent | f6b6d5cf6486926a1c8dffe4ef793e214cb827c5 (diff) | |
| download | rust-6002e78392541b61055f1fd32cbf310ac4409a88.tar.gz rust-6002e78392541b61055f1fd32cbf310ac4409a88.zip | |
Builder: Warn if test file does not exist
| -rw-r--r-- | src/bootstrap/test.rs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 33e252a63c9..5caadca1dad 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -1126,7 +1126,19 @@ note: if you're sure you want to do this, please open an issue as to why. In the Ok(path) => path, Err(_) => p, }) - .filter(|p| p.starts_with(suite_path) && (p.is_dir() || p.is_file())) + .filter(|p| p.starts_with(suite_path)) + .filter(|p| { + let exists = p.is_dir() || p.is_file(); + if !exists { + if let Some(p) = p.to_str() { + builder.info(&format!( + "Warning: Skipping \"{}\": not a regular file or directory", + p + )); + } + } + exists + }) .filter_map(|p| { // Since test suite paths are themselves directories, if we don't // specify a directory or file, we'll get an empty string here |
