]> git.lizzy.rs Git - rust.git/blobdiff - src/bootstrap/test.rs
Various minor/cosmetic improvements to code
[rust.git] / src / bootstrap / test.rs
index e6c260a1426f97f6bc2b549fe4d03cdfe22db06f..eaffc9df1f03139f2ef7e083570a3121847609ce 100644 (file)
@@ -971,7 +971,7 @@ fn run(self, builder: &Builder) {
         }
 
         if builder.no_std(target) == Some(true) {
-            // for no_std run-make (e.g. thumb*),
+            // for no_std run-make (e.g., thumb*),
             // we need a host compiler which is called by cargo.
             builder.ensure(compile::Std { compiler, target: compiler.host });
         }
@@ -1022,7 +1022,13 @@ fn run(self, builder: &Builder) {
             cmd.arg("--bless");
         }
 
-        let compare_mode = builder.config.cmd.compare_mode().or(self.compare_mode);
+        let compare_mode = builder.config.cmd.compare_mode().or_else(|| {
+            if builder.config.test_compare_mode {
+                self.compare_mode
+            } else {
+                None
+            }
+        });
 
         if let Some(ref nodejs) = builder.config.nodejs {
             cmd.arg("--nodejs").arg(nodejs);
@@ -1271,7 +1277,7 @@ fn should_run(run: ShouldRun) -> ShouldRun {
 
     /// Run `rustdoc --test` for all documentation in `src/doc`.
     ///
-    /// This will run all tests in our markdown documentation (e.g. the book)
+    /// This will run all tests in our markdown documentation (e.g., the book)
     /// located in `src/doc`. The `rustdoc` that's run is the one that sits next to
     /// `compiler`.
     fn run(self, builder: &Builder) {