about summary refs log tree commit diff
path: root/src/bootstrap/builder
diff options
context:
space:
mode:
Diffstat (limited to 'src/bootstrap/builder')
-rw-r--r--src/bootstrap/builder/tests.rs153
1 files changed, 64 insertions, 89 deletions
diff --git a/src/bootstrap/builder/tests.rs b/src/bootstrap/builder/tests.rs
index d1542b1fca6..2bb90fdb04e 100644
--- a/src/bootstrap/builder/tests.rs
+++ b/src/bootstrap/builder/tests.rs
@@ -366,27 +366,6 @@ fn dist_with_same_targets_and_hosts() {
         ]
     );
     assert_eq!(
-        first(builder.cache.all::<compile::Test>()),
-        &[
-            compile::Test {
-                compiler: Compiler { host: a, stage: 0 },
-                target: a,
-            },
-            compile::Test {
-                compiler: Compiler { host: a, stage: 1 },
-                target: a,
-            },
-            compile::Test {
-                compiler: Compiler { host: a, stage: 2 },
-                target: a,
-            },
-            compile::Test {
-                compiler: Compiler { host: a, stage: 1 },
-                target: b,
-            },
-        ]
-    );
-    assert_eq!(
         first(builder.cache.all::<compile::Assemble>()),
         &[
             compile::Assemble {
@@ -415,7 +394,47 @@ fn build_default() {
     let b = INTERNER.intern_str("B");
     let c = INTERNER.intern_str("C");
 
-    assert!(!builder.cache.all::<compile::Std>().is_empty());
+    assert_eq!(
+        first(builder.cache.all::<compile::Std>()),
+        &[
+            compile::Std {
+                compiler: Compiler { host: a, stage: 0 },
+                target: a,
+            },
+            compile::Std {
+                compiler: Compiler { host: a, stage: 1 },
+                target: a,
+            },
+            compile::Std {
+                compiler: Compiler { host: a, stage: 2 },
+                target: a,
+            },
+            compile::Std {
+                compiler: Compiler { host: b, stage: 2 },
+                target: a,
+            },
+            compile::Std {
+                compiler: Compiler { host: a, stage: 1 },
+                target: b,
+            },
+            compile::Std {
+                compiler: Compiler { host: a, stage: 2 },
+                target: b,
+            },
+            compile::Std {
+                compiler: Compiler { host: b, stage: 2 },
+                target: b,
+            },
+            compile::Std {
+                compiler: Compiler { host: a, stage: 2 },
+                target: c,
+            },
+            compile::Std {
+                compiler: Compiler { host: b, stage: 2 },
+                target: c,
+            },
+        ]
+    );
     assert!(!builder.cache.all::<compile::Assemble>().is_empty());
     assert_eq!(
         first(builder.cache.all::<compile::Rustc>()),
@@ -450,63 +469,61 @@ fn build_default() {
             },
         ]
     );
+}
+
+#[test]
+fn build_with_target_flag() {
+    let mut config = configure(&["B"], &["C"]);
+    config.skip_only_host_steps = true;
+    let build = Build::new(config);
+    let mut builder = Builder::new(&build);
+    builder.run_step_descriptions(&Builder::get_step_descriptions(Kind::Build), &[]);
+
+    let a = INTERNER.intern_str("A");
+    let b = INTERNER.intern_str("B");
+    let c = INTERNER.intern_str("C");
 
     assert_eq!(
-        first(builder.cache.all::<compile::Test>()),
+        first(builder.cache.all::<compile::Std>()),
         &[
-            compile::Test {
+            compile::Std {
                 compiler: Compiler { host: a, stage: 0 },
                 target: a,
             },
-            compile::Test {
+            compile::Std {
                 compiler: Compiler { host: a, stage: 1 },
                 target: a,
             },
-            compile::Test {
+            compile::Std {
                 compiler: Compiler { host: a, stage: 2 },
                 target: a,
             },
-            compile::Test {
+            compile::Std {
                 compiler: Compiler { host: b, stage: 2 },
                 target: a,
             },
-            compile::Test {
+            compile::Std {
                 compiler: Compiler { host: a, stage: 1 },
                 target: b,
             },
-            compile::Test {
+            compile::Std {
                 compiler: Compiler { host: a, stage: 2 },
                 target: b,
             },
-            compile::Test {
+            compile::Std {
                 compiler: Compiler { host: b, stage: 2 },
                 target: b,
             },
-            compile::Test {
+            compile::Std {
                 compiler: Compiler { host: a, stage: 2 },
                 target: c,
             },
-            compile::Test {
+            compile::Std {
                 compiler: Compiler { host: b, stage: 2 },
                 target: c,
             },
         ]
     );
-}
-
-#[test]
-fn build_with_target_flag() {
-    let mut config = configure(&["B"], &["C"]);
-    config.skip_only_host_steps = true;
-    let build = Build::new(config);
-    let mut builder = Builder::new(&build);
-    builder.run_step_descriptions(&Builder::get_step_descriptions(Kind::Build), &[]);
-
-    let a = INTERNER.intern_str("A");
-    let b = INTERNER.intern_str("B");
-    let c = INTERNER.intern_str("C");
-
-    assert!(!builder.cache.all::<compile::Std>().is_empty());
     assert_eq!(
         first(builder.cache.all::<compile::Assemble>()),
         &[
@@ -541,48 +558,6 @@ fn build_with_target_flag() {
             },
         ]
     );
-
-    assert_eq!(
-        first(builder.cache.all::<compile::Test>()),
-        &[
-            compile::Test {
-                compiler: Compiler { host: a, stage: 0 },
-                target: a,
-            },
-            compile::Test {
-                compiler: Compiler { host: a, stage: 1 },
-                target: a,
-            },
-            compile::Test {
-                compiler: Compiler { host: a, stage: 2 },
-                target: a,
-            },
-            compile::Test {
-                compiler: Compiler { host: b, stage: 2 },
-                target: a,
-            },
-            compile::Test {
-                compiler: Compiler { host: a, stage: 1 },
-                target: b,
-            },
-            compile::Test {
-                compiler: Compiler { host: a, stage: 2 },
-                target: b,
-            },
-            compile::Test {
-                compiler: Compiler { host: b, stage: 2 },
-                target: b,
-            },
-            compile::Test {
-                compiler: Compiler { host: a, stage: 2 },
-                target: c,
-            },
-            compile::Test {
-                compiler: Compiler { host: b, stage: 2 },
-                target: c,
-            },
-        ]
-    );
 }
 
 #[test]