about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2019-05-14 09:42:32 +0100
committervarkor <github@varkor.com>2019-05-14 09:42:32 +0100
commitb470d48c8a58a6cd91a14e5ba6387f424da6c5db (patch)
tree3309e2b11a4042321ecbf9a9888c650f3cc8bc72
parentbf3c46cfc9dbe677ae801f0459cea5b8e5e5a178 (diff)
downloadrust-b470d48c8a58a6cd91a14e5ba6387f424da6c5db.tar.gz
rust-b470d48c8a58a6cd91a14e5ba6387f424da6c5db.zip
Add comment
-rw-r--r--src/bootstrap/test.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index 3847a2a1e46..f1bb318651a 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -1186,6 +1186,12 @@ impl Step for Compiletest {
             })
             .filter(|p| p.starts_with(suite_path) && (p.is_dir() || p.is_file()))
             .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
+                // (the result of the test suite directory without its suite prefix).
+                // Therefore, we need to filter these out, as only the first --test-args
+                // flag is respected, so providing an empty --test-args conflicts with
+                // any following it.
                 match p.strip_prefix(suite_path).ok().and_then(|p| p.to_str()) {
                     Some(s) if s != "" => Some(s),
                     _ => None,