Skip to content

Commit b470d48

Browse files
committed
Add comment
1 parent bf3c46c commit b470d48

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/bootstrap/test.rs

+6
Original file line numberDiff line numberDiff line change
@@ -1186,6 +1186,12 @@ impl Step for Compiletest {
11861186
})
11871187
.filter(|p| p.starts_with(suite_path) && (p.is_dir() || p.is_file()))
11881188
.filter_map(|p| {
1189+
// Since test suite paths are themselves directories, if we don't
1190+
// specify a directory or file, we'll get an empty string here
1191+
// (the result of the test suite directory without its suite prefix).
1192+
// Therefore, we need to filter these out, as only the first --test-args
1193+
// flag is respected, so providing an empty --test-args conflicts with
1194+
// any following it.
11891195
match p.strip_prefix(suite_path).ok().and_then(|p| p.to_str()) {
11901196
Some(s) if s != "" => Some(s),
11911197
_ => None,

0 commit comments

Comments
 (0)