Skip to content

Commit aef4dbf

Browse files
committed
Auto merge of #56391 - alexcrichton:less-compare-mode, r=Mark-Simulacrum
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.
2 parents d09466c + 8ee62bb commit aef4dbf

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

config.toml.example

+5
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,11 @@
400400
# override the default allocator for rustc and LLVM.
401401
#jemalloc = false
402402

403+
# Run tests in various test suites with the "nll compare mode" in addition to
404+
# running the tests in normal mode. Largely only used on CI and during local
405+
# development of NLL
406+
#test-compare-mode = false
407+
403408
# =============================================================================
404409
# Options for specific targets
405410
#

src/bootstrap/config.rs

+3
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ pub struct Config {
5858
pub ignore_git: bool,
5959
pub exclude: Vec<PathBuf>,
6060
pub rustc_error_format: Option<String>,
61+
pub test_compare_mode: bool,
6162

6263
pub run_host_only: bool,
6364

@@ -326,6 +327,7 @@ struct Rust {
326327
verify_llvm_ir: Option<bool>,
327328
remap_debuginfo: Option<bool>,
328329
jemalloc: Option<bool>,
330+
test_compare_mode: Option<bool>,
329331
}
330332

331333
/// TOML representation of how each build target is configured.
@@ -540,6 +542,7 @@ impl Config {
540542
set(&mut config.codegen_tests, rust.codegen_tests);
541543
set(&mut config.rust_rpath, rust.rpath);
542544
set(&mut config.jemalloc, rust.jemalloc);
545+
set(&mut config.test_compare_mode, rust.test_compare_mode);
543546
set(&mut config.backtrace, rust.backtrace);
544547
set(&mut config.channel, rust.channel.clone());
545548
set(&mut config.rust_dist_src, rust.dist_src);

src/bootstrap/test.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -1022,7 +1022,13 @@ impl Step for Compiletest {
10221022
cmd.arg("--bless");
10231023
}
10241024

1025-
let compare_mode = builder.config.cmd.compare_mode().or(self.compare_mode);
1025+
let compare_mode = builder.config.cmd.compare_mode().or_else(|| {
1026+
if builder.config.test_compare_mode {
1027+
self.compare_mode
1028+
} else {
1029+
None
1030+
}
1031+
});
10261032

10271033
if let Some(ref nodejs) = builder.config.nodejs {
10281034
cmd.arg("--nodejs").arg(nodejs);

src/ci/docker/x86_64-gnu-nopt/Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1616
COPY scripts/sccache.sh /scripts/
1717
RUN sh /scripts/sccache.sh
1818

19-
ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu --disable-optimize-tests
19+
ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu \
20+
--disable-optimize-tests \
21+
--set rust.test-compare-mode
2022
ENV RUST_CHECK_TARGET check

0 commit comments

Comments
 (0)