Skip to content

Commit

Permalink
Auto merge of #32786 - brson:cargotest, r=alexcrichton
Browse files Browse the repository at this point in the history
Fix cargotest

Tested in dev.
  • Loading branch information
bors committed Apr 9, 2016
2 parents 42ea682 + 8019922 commit 526f2bf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
13 changes: 11 additions & 2 deletions src/bootstrap/build/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,18 @@ pub fn linkcheck(build: &Build, stage: u32, host: &str) {
}

pub fn cargotest(build: &Build, stage: u32, host: &str) {

let ref compiler = Compiler::new(stage, host);

// Configure PATH to find the right rustc. NB. we have to use PATH
// and not RUSTC because the Cargo test suite has tests that will
// fail if rustc is not spelled `rustc`.
let path = build.sysroot(compiler).join("bin");
let old_path = ::std::env::var("PATH").expect("");
let sep = if cfg!(windows) { ";" } else {":" };
let ref newpath = format!("{}{}{}", path.display(), sep, old_path);

build.run(build.tool_cmd(compiler, "cargotest")
.env("RUSTC", build.compiler_path(compiler))
.env("RUSTDOC", build.rustdoc(compiler))
.env("PATH", newpath)
.arg(&build.cargo));
}
2 changes: 1 addition & 1 deletion src/bootstrap/build/step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ impl<'a> Step<'a> {
vec![self.librustc(self.compiler(stage))]
}
Source::ToolCargoTest { stage } => {
vec![self.libstd(self.compiler(stage))]
vec![self.librustc(self.compiler(stage))]
}

Source::DistDocs { stage } => vec![self.doc(stage)],
Expand Down
2 changes: 1 addition & 1 deletion src/tools/cargotest/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use std::io::Write;

const TEST_REPOS: &'static [(&'static str, &'static str, Option<&'static str>)] = &[
("https://github.com/rust-lang/cargo",
"ff02b156f094fb83e70acd965c83c9286411914e",
"fae9c539388f1b7c70c31fd0a21b5dd9cd071177",
None),
("https://github.com/iron/iron",
"16c858ec2901e2992fe5e529780f59fa8ed12903",
Expand Down

0 comments on commit 526f2bf

Please sign in to comment.