X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fbootstrap%2Fstep.rs;h=a1b26f44b7de132317834581a4fdddf1eaf05188;hb=1edbc3df0d051902916ead8e81db16a6f546f973;hp=c221d7076832fa6aee6b5d7b363d6d29d30a4fbd;hpb=edbfbbfdd88e4c0225e818c1164241d7df6e5b52;p=rust.git diff --git a/src/bootstrap/step.rs b/src/bootstrap/step.rs index c221d707683..a1b26f44b7d 100644 --- a/src/bootstrap/step.rs +++ b/src/bootstrap/step.rs @@ -28,6 +28,7 @@ use std::collections::{BTreeMap, HashSet, HashMap}; use std::mem; +use std::path::PathBuf; use std::process; use check::{self, TestKind}; @@ -471,10 +472,14 @@ fn crate_rule<'a, 'b>(build: &'a Build, .dep(|s| s.name("librustc")) .host(true) .run(move |s| check::cargotest(build, s.stage, s.target)); - rules.test("check-cargo", "cargo") + rules.test("check-cargo", "src/tools/cargo") .dep(|s| s.name("tool-cargo")) .host(true) .run(move |s| check::cargo(build, s.stage, s.target)); + rules.test("check-rls", "src/tools/rls") + .dep(|s| s.name("tool-rls")) + .host(true) + .run(move |s| check::rls(build, s.stage, s.target)); rules.test("check-tidy", "src/tools/tidy") .dep(|s| s.name("tool-tidy").stage(0)) .default(true) @@ -1209,11 +1214,19 @@ fn plan(&self) -> Vec> { if paths.len() == 0 && rule.default { Some((rule, 0)) } else { - paths.iter().position(|path| path.ends_with(rule.path)) + paths.iter() + .position(|path| path.ends_with(rule.path)) .map(|priority| (rule, priority)) } }).collect(); + if rules.is_empty() && + !paths.get(0).unwrap_or(&PathBuf::new()) + .ends_with("nonexistent/path/to/trigger/cargo/metadata") { + println!("\nNothing to run...\n"); + process::exit(1); + } + rules.sort_by_key(|&(_, priority)| priority); rules.into_iter().flat_map(|(rule, _)| {