about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/build/check.rs13
-rw-r--r--src/bootstrap/build/step.rs5
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)],