Skip to content

Commit

Permalink
Do not test RLS and rustfmt if build of these failed.
Browse files Browse the repository at this point in the history
Avoid a tool being simultaneously test-pass and build-fail.
  • Loading branch information
kennytm committed Apr 20, 2018
1 parent 6586074 commit 27d9691
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,16 @@ impl Step for Rls {
let host = self.host;
let compiler = builder.compiler(stage, host);

builder.ensure(tool::Rls { compiler, target: self.host, extra_features: Vec::new() });
let build_result = builder.ensure(tool::Rls {
compiler,
target: self.host,
extra_features: Vec::new(),
});
if build_result.is_none() {
eprintln!("failed to test rls: could not build");
return;
}

let mut cargo = tool::prepare_tool_cargo(builder,
compiler,
host,
Expand Down Expand Up @@ -286,7 +295,16 @@ impl Step for Rustfmt {
let host = self.host;
let compiler = builder.compiler(stage, host);

builder.ensure(tool::Rustfmt { compiler, target: self.host, extra_features: Vec::new() });
let build_result = builder.ensure(tool::Rustfmt {
compiler,
target: self.host,
extra_features: Vec::new(),
});
if build_result.is_none() {
eprintln!("failed to test rustfmt: could not build");
return;
}

let mut cargo = tool::prepare_tool_cargo(builder,
compiler,
host,
Expand Down

0 comments on commit 27d9691

Please sign in to comment.