]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #56391 - alexcrichton:less-compare-mode, r=Mark-Simulacrum
authorbors <bors@rust-lang.org>
Sat, 1 Dec 2018 03:04:12 +0000 (03:04 +0000)
committerbors <bors@rust-lang.org>
Sat, 1 Dec 2018 03:04:12 +0000 (03:04 +0000)
ci: Only run compare-mode tests on one builder

The run-pass test suite currently takes 30 minutes on Windows, and
that appears to be roughly split between two 15 minute runs of the test
suite: one without NLL and one with NLL. In discussion on Discord the
platform coverage of the NLL compare mode may not necessarily be worth
it, so this commit removes the NLL compare mode from tests by default,
and then reenables it on only one builder.

config.toml.example
src/bootstrap/config.rs
src/bootstrap/test.rs
src/ci/docker/x86_64-gnu-nopt/Dockerfile

index 8b11014edae795c1a4638680d475e16247c5b056..f75e220de47e7c1c043afe6dcef3f7b8972ac4ff 100644 (file)
 # override the default allocator for rustc and LLVM.
 #jemalloc = false
 
+# Run tests in various test suites with the "nll compare mode" in addition to
+# running the tests in normal mode. Largely only used on CI and during local
+# development of NLL
+#test-compare-mode = false
+
 # =============================================================================
 # Options for specific targets
 #
index 0f249eee000224a9f0b8d1ff48878dae20e0551b..8fc2d5787cb4b85a716d6b105cbf749aa3ed1d52 100644 (file)
@@ -58,6 +58,7 @@ pub struct Config {
     pub ignore_git: bool,
     pub exclude: Vec<PathBuf>,
     pub rustc_error_format: Option<String>,
+    pub test_compare_mode: bool,
 
     pub run_host_only: bool,
 
@@ -326,6 +327,7 @@ struct Rust {
     verify_llvm_ir: Option<bool>,
     remap_debuginfo: Option<bool>,
     jemalloc: Option<bool>,
+    test_compare_mode: Option<bool>,
 }
 
 /// TOML representation of how each build target is configured.
@@ -540,6 +542,7 @@ pub fn parse(args: &[String]) -> Config {
             set(&mut config.codegen_tests, rust.codegen_tests);
             set(&mut config.rust_rpath, rust.rpath);
             set(&mut config.jemalloc, rust.jemalloc);
+            set(&mut config.test_compare_mode, rust.test_compare_mode);
             set(&mut config.backtrace, rust.backtrace);
             set(&mut config.channel, rust.channel.clone());
             set(&mut config.rust_dist_src, rust.dist_src);
index e6c260a1426f97f6bc2b549fe4d03cdfe22db06f..da827356800e96ed76a04f846a1d16057923a3c9 100644 (file)
@@ -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);
index d2b0dd13dc2df985d46bd6d7c776e981f6b45aea..b0780fdf32a5926a56ec95668367d5aa9f5b670b 100644 (file)
@@ -16,5 +16,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
 COPY scripts/sccache.sh /scripts/
 RUN sh /scripts/sccache.sh
 
-ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu --disable-optimize-tests
+ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu \
+  --disable-optimize-tests \
+  --set rust.test-compare-mode
 ENV RUST_CHECK_TARGET check