1
Fork 0

Handle current directory prefix for parsing command arguments in bootstrap test command.

This commit is contained in:
Steven Laabs 2018-06-21 23:57:06 -05:00
parent be3cd464fd
commit 475405b6af

View file

@ -1074,6 +1074,12 @@ impl Step for Compiletest {
// Get test-args by striping suite path // Get test-args by striping suite path
let mut test_args: Vec<&str> = paths let mut test_args: Vec<&str> = paths
.iter() .iter()
.map(|p| {
match p.strip_prefix(".") {
Ok(path) => path,
Err(_) => p,
}
})
.filter(|p| p.starts_with(suite_path) && p.is_file()) .filter(|p| p.starts_with(suite_path) && p.is_file())
.map(|p| p.strip_prefix(suite_path).unwrap().to_str().unwrap()) .map(|p| p.strip_prefix(suite_path).unwrap().to_str().unwrap())
.collect(); .collect();