Skip to content

Commit

Permalink
Show suite paths (src/test/ui/...) in help output.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Jun 14, 2020
1 parent 607e851 commit c2b920f
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/bootstrap/builder.rs
Expand Up @@ -489,13 +489,19 @@ impl<'a> Builder<'a> {
should_run = (desc.should_run)(should_run);
}
let mut help = String::from("Available paths:\n");
let mut add_path = |path: &Path| {
help.push_str(&format!(" ./x.py {} {}\n", subcommand, path.display()));
};
for pathset in should_run.paths {
if let PathSet::Set(set) = pathset {
set.iter().for_each(|path| {
help.push_str(
format!(" ./x.py {} {}\n", subcommand, path.display()).as_str(),
)
})
match pathset {
PathSet::Set(set) => {
for path in set {
add_path(&path);
}
}
PathSet::Suite(path) => {
add_path(&path.join("..."));
}
}
}
Some(help)
Expand Down

0 comments on commit c2b920f

Please sign in to comment.