Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not test RLS/Rustfmt if build failed #50123

Merged
merged 1 commit into from
Apr 22, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Do not test RLS and rustfmt if build of these failed.
Avoid a tool being simultaneously test-pass and build-fail.
  • Loading branch information
kennytm committed Apr 20, 2018
commit 27d9691d800eb243a29b812ff201d6e03a01d170
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