diff options
| author | bors <bors@rust-lang.org> | 2016-04-15 10:32:10 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-04-15 10:32:10 -0700 |
| commit | ccc7e95a964ece830caf66ad537e89ae6fb397a6 (patch) | |
| tree | 0275ba3acb450d7691a7eb236848b63e0dde2dba /src/bootstrap | |
| parent | 5d5f4b5e3fcd377400bcc2140621cff6fd73a617 (diff) | |
| parent | 73c2d2a7419844f763b1ac72b89236bd3183bfaf (diff) | |
| download | rust-ccc7e95a964ece830caf66ad537e89ae6fb397a6.tar.gz rust-ccc7e95a964ece830caf66ad537e89ae6fb397a6.zip | |
Auto merge of #32972 - alexcrichton:cargotest, r=brson
cargotest: Put output in build directory Right now cargotest uses `TempDir` to place output into the system temp directory, but unfortunately this means that if the process is interrupted then it'll leak the directory and that'll never get cleaned up. One of our bots filled up its disk space and there were 20 cargotest directories lying around so seems prudent to clean them up! By putting the output in the build directory it should ensure that we don't leak too many extra builds.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/build/check.rs | 13 | ||||
| -rw-r--r-- | src/bootstrap/build/step.rs | 5 |
2 files changed, 14 insertions, 4 deletions
diff --git a/src/bootstrap/build/check.rs b/src/bootstrap/build/check.rs index d4e344fc482..6aad49bc988 100644 --- a/src/bootstrap/build/check.rs +++ b/src/bootstrap/build/check.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +use std::fs; + use build::{Build, Compiler}; pub fn linkcheck(build: &Build, stage: u32, host: &str) { @@ -29,9 +31,16 @@ pub fn cargotest(build: &Build, stage: u32, host: &str) { let sep = if cfg!(windows) { ";" } else {":" }; let ref newpath = format!("{}{}{}", path.display(), sep, old_path); + // Note that this is a short, cryptic, and not scoped directory name. This + // is currently to minimize the length of path on Windows where we otherwise + // quickly run into path name limit constraints. + let out_dir = build.out.join("ct"); + t!(fs::create_dir_all(&out_dir)); + build.run(build.tool_cmd(compiler, "cargotest") - .env("PATH", newpath) - .arg(&build.cargo)); + .env("PATH", newpath) + .arg(&build.cargo) + .arg(&out_dir)); } pub fn tidy(build: &Build, stage: u32, host: &str) { diff --git a/src/bootstrap/build/step.rs b/src/bootstrap/build/step.rs index 2312f96348c..07cfb96c30d 100644 --- a/src/bootstrap/build/step.rs +++ b/src/bootstrap/build/step.rs @@ -318,7 +318,8 @@ impl<'a> Step<'a> { vec![self.tool_linkchecker(stage), self.doc(stage)] } Source::CheckCargoTest { stage } => { - vec![self.tool_cargotest(stage)] + vec![self.tool_cargotest(stage), + self.librustc(self.compiler(stage))] } Source::CheckTidy { stage } => { vec![self.tool_tidy(stage)] @@ -333,7 +334,7 @@ impl<'a> Step<'a> { vec![self.librustc(self.compiler(stage))] } Source::ToolCargoTest { stage } => { - vec![self.librustc(self.compiler(stage))] + vec![self.libstd(self.compiler(stage))] } Source::DistDocs { stage } => vec![self.doc(stage)], |
