Skip to content

Commit 6ec1b62

Browse files
committed
Auto merge of #51367 - oli-obk:silence!_I_test_you, r=Mark-Simulacrum
Use quiet tests by default r? @eddyb
2 parents a646c91 + 0c1bcd3 commit 6ec1b62

File tree

5 files changed

+16
-18
lines changed

5 files changed

+16
-18
lines changed

config.toml.example

+3-3
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,9 @@
301301
# desired in distributions, for example.
302302
#rpath = true
303303

304-
# Suppresses extraneous output from tests to ensure the output of the test
305-
# harness is relatively clean.
306-
#quiet-tests = false
304+
# Emits extraneous output from tests to ensure that failures of the test
305+
# harness are debuggable just from logfiles.
306+
#verbose-tests = false
307307

308308
# Flag indicating whether tests are compiled with optimizations (the -O flag) or
309309
# with debuginfo (the -g flag)

src/bootstrap/config.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ pub struct Config {
125125
// misc
126126
pub low_priority: bool,
127127
pub channel: String,
128-
pub quiet_tests: bool,
128+
pub verbose_tests: bool,
129129
pub test_miri: bool,
130130
pub save_toolstates: Option<PathBuf>,
131131
pub print_step_timings: bool,
@@ -301,7 +301,7 @@ struct Rust {
301301
ignore_git: Option<bool>,
302302
debug: Option<bool>,
303303
dist_src: Option<bool>,
304-
quiet_tests: Option<bool>,
304+
verbose_tests: Option<bool>,
305305
test_miri: Option<bool>,
306306
incremental: Option<bool>,
307307
save_toolstates: Option<String>,
@@ -528,7 +528,7 @@ impl Config {
528528
set(&mut config.backtrace, rust.backtrace);
529529
set(&mut config.channel, rust.channel.clone());
530530
set(&mut config.rust_dist_src, rust.dist_src);
531-
set(&mut config.quiet_tests, rust.quiet_tests);
531+
set(&mut config.verbose_tests, rust.verbose_tests);
532532
set(&mut config.test_miri, rust.test_miri);
533533
// in the case "false" is set explicitly, do not overwrite the command line args
534534
if let Some(true) = rust.incremental {

src/bootstrap/configure.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def v(*args):
4747
o("experimental-parallel-queries", "rust.experimental-parallel-queries", "build rustc with experimental parallelization")
4848
o("test-miri", "rust.test-miri", "run miri's test suite")
4949
o("debuginfo-tests", "rust.debuginfo-tests", "build tests with debugger metadata")
50-
o("quiet-tests", "rust.quiet-tests", "enable quieter output when running tests")
50+
o("verbose-tests", "rust.verbose-tests", "enable verbose output when running tests")
5151
o("ccache", "llvm.ccache", "invoke gcc/clang via ccache to reuse object files between builds")
5252
o("sccache", None, "invoke gcc/clang via sccache to reuse object files between builds")
5353
o("local-rust", None, "use an installed rustc rather than downloading a snapshot")

src/bootstrap/test.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ impl Step for Tidy {
632632
if !builder.config.vendor {
633633
cmd.arg("--no-vendor");
634634
}
635-
if builder.config.quiet_tests {
635+
if !builder.config.verbose_tests {
636636
cmd.arg("--quiet");
637637
}
638638

@@ -1086,7 +1086,7 @@ impl Step for Compiletest {
10861086
cmd.arg("--verbose");
10871087
}
10881088

1089-
if builder.config.quiet_tests {
1089+
if !builder.config.verbose_tests {
10901090
cmd.arg("--quiet");
10911091
}
10921092

@@ -1397,10 +1397,10 @@ fn markdown_test(builder: &Builder, compiler: Compiler, markdown: &Path) -> bool
13971397
let test_args = builder.config.cmd.test_args().join(" ");
13981398
cmd.arg("--test-args").arg(test_args);
13991399

1400-
if builder.config.quiet_tests {
1401-
try_run_quiet(builder, &mut cmd)
1402-
} else {
1400+
if builder.config.verbose_tests {
14031401
try_run(builder, &mut cmd)
1402+
} else {
1403+
try_run_quiet(builder, &mut cmd)
14041404
}
14051405
}
14061406

@@ -1632,7 +1632,7 @@ impl Step for Crate {
16321632
cargo.arg("--");
16331633
cargo.args(&builder.config.cmd.test_args());
16341634

1635-
if builder.config.quiet_tests {
1635+
if !builder.config.verbose_tests {
16361636
cargo.arg("--quiet");
16371637
}
16381638

@@ -1742,7 +1742,7 @@ impl Step for CrateRustdoc {
17421742
cargo.arg("--");
17431743
cargo.args(&builder.config.cmd.test_args());
17441744

1745-
if builder.config.quiet_tests {
1745+
if !builder.config.verbose_tests {
17461746
cargo.arg("--quiet");
17471747
}
17481748

src/ci/run.sh

+2-4
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ fi
2727
ci_dir=`cd $(dirname $0) && pwd`
2828
source "$ci_dir/shared.sh"
2929

30-
if [ "$TRAVIS" == "true" ] && [ "$TRAVIS_BRANCH" != "auto" ]; then
31-
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-quiet-tests"
32-
else
33-
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set build.print-step-timings"
30+
if [ "$TRAVIS" != "true" ] || [ "$TRAVIS_BRANCH" == "auto" ]; then
31+
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set build.print-step-timings --enable-verbose-tests"
3432
fi
3533

3634
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-sccache"

0 commit comments

Comments
 (0)