Skip to content

Commit 6002e78

Browse files
committed
Builder: Warn if test file does not exist
1 parent f6b6d5c commit 6002e78

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/bootstrap/test.rs

+13-1
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,19 @@ note: if you're sure you want to do this, please open an issue as to why. In the
11261126
Ok(path) => path,
11271127
Err(_) => p,
11281128
})
1129-
.filter(|p| p.starts_with(suite_path) && (p.is_dir() || p.is_file()))
1129+
.filter(|p| p.starts_with(suite_path))
1130+
.filter(|p| {
1131+
let exists = p.is_dir() || p.is_file();
1132+
if !exists {
1133+
if let Some(p) = p.to_str() {
1134+
builder.info(&format!(
1135+
"Warning: Skipping \"{}\": not a regular file or directory",
1136+
p
1137+
));
1138+
}
1139+
}
1140+
exists
1141+
})
11301142
.filter_map(|p| {
11311143
// Since test suite paths are themselves directories, if we don't
11321144
// specify a directory or file, we'll get an empty string here

0 commit comments

Comments
 (0)