From 0c1bcd3871d08490fbe9aa5368a0cf043aeb5683 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Thu, 7 Jun 2018 14:40:36 +0200 Subject: [PATCH] quiet-tests -> !verbose-tests --- config.toml.example | 6 +++--- src/bootstrap/config.rs | 7 +++---- src/bootstrap/configure.py | 2 +- src/bootstrap/test.rs | 14 +++++++------- src/ci/run.sh | 6 ++---- 5 files changed, 16 insertions(+), 19 deletions(-) diff --git a/config.toml.example b/config.toml.example index a72217e0e21..feb55d57ef3 100644 --- a/config.toml.example +++ b/config.toml.example @@ -301,9 +301,9 @@ # desired in distributions, for example. #rpath = true -# Suppresses extraneous output from tests to ensure the output of the test -# harness is relatively clean. -#quiet-tests = true +# Emits extraneous output from tests to ensure that failures of the test +# harness are debuggable just from logfiles. +#verbose-tests = false # Flag indicating whether tests are compiled with optimizations (the -O flag) or # with debuginfo (the -g flag) diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index dee2c400a29..11e0b6900b0 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -125,7 +125,7 @@ pub struct Config { // misc pub low_priority: bool, pub channel: String, - pub quiet_tests: bool, + pub verbose_tests: bool, pub test_miri: bool, pub save_toolstates: Option, pub print_step_timings: bool, @@ -301,7 +301,7 @@ struct Rust { ignore_git: Option, debug: Option, dist_src: Option, - quiet_tests: Option, + verbose_tests: Option, test_miri: Option, incremental: Option, save_toolstates: Option, @@ -347,7 +347,6 @@ impl Config { config.backtrace = true; config.rust_optimize = true; config.rust_optimize_tests = true; - config.quiet_tests = true; config.submodules = true; config.fast_submodules = true; config.docs = true; @@ -529,7 +528,7 @@ impl Config { set(&mut config.backtrace, rust.backtrace); set(&mut config.channel, rust.channel.clone()); set(&mut config.rust_dist_src, rust.dist_src); - set(&mut config.quiet_tests, rust.quiet_tests); + set(&mut config.verbose_tests, rust.verbose_tests); set(&mut config.test_miri, rust.test_miri); // in the case "false" is set explicitly, do not overwrite the command line args if let Some(true) = rust.incremental { diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py index 3574b7d210a..446db9c0a9e 100755 --- a/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py @@ -47,7 +47,7 @@ o("optimize-tests", "rust.optimize-tests", "build tests with optimizations") o("experimental-parallel-queries", "rust.experimental-parallel-queries", "build rustc with experimental parallelization") o("test-miri", "rust.test-miri", "run miri's test suite") o("debuginfo-tests", "rust.debuginfo-tests", "build tests with debugger metadata") -o("quiet-tests", "rust.quiet-tests", "enable quieter output when running tests") +o("verbose-tests", "rust.verbose-tests", "enable verbose output when running tests") o("ccache", "llvm.ccache", "invoke gcc/clang via ccache to reuse object files between builds") o("sccache", None, "invoke gcc/clang via sccache to reuse object files between builds") o("local-rust", None, "use an installed rustc rather than downloading a snapshot") diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index a0b6222421d..25a8116ff2a 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -632,7 +632,7 @@ impl Step for Tidy { if !builder.config.vendor { cmd.arg("--no-vendor"); } - if builder.config.quiet_tests { + if !builder.config.verbose_tests { cmd.arg("--quiet"); } @@ -1086,7 +1086,7 @@ impl Step for Compiletest { cmd.arg("--verbose"); } - if builder.config.quiet_tests { + if !builder.config.verbose_tests { cmd.arg("--quiet"); } @@ -1397,10 +1397,10 @@ fn markdown_test(builder: &Builder, compiler: Compiler, markdown: &Path) -> bool let test_args = builder.config.cmd.test_args().join(" "); cmd.arg("--test-args").arg(test_args); - if builder.config.quiet_tests { - try_run_quiet(builder, &mut cmd) - } else { + if builder.config.verbose_tests { try_run(builder, &mut cmd) + } else { + try_run_quiet(builder, &mut cmd) } } @@ -1632,7 +1632,7 @@ impl Step for Crate { cargo.arg("--"); cargo.args(&builder.config.cmd.test_args()); - if builder.config.quiet_tests { + if !builder.config.verbose_tests { cargo.arg("--quiet"); } @@ -1742,7 +1742,7 @@ impl Step for CrateRustdoc { cargo.arg("--"); cargo.args(&builder.config.cmd.test_args()); - if builder.config.quiet_tests { + if !builder.config.verbose_tests { cargo.arg("--quiet"); } diff --git a/src/ci/run.sh b/src/ci/run.sh index 456f8cc7317..5b1fb676187 100755 --- a/src/ci/run.sh +++ b/src/ci/run.sh @@ -27,10 +27,8 @@ fi ci_dir=`cd $(dirname $0) && pwd` source "$ci_dir/shared.sh" -if [ "$TRAVIS" == "true" ] && [ "$TRAVIS_BRANCH" != "auto" ]; then - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-quiet-tests" -else - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set build.print-step-timings" +if [ "$TRAVIS" != "true" ] || [ "$TRAVIS_BRANCH" == "auto" ]; then + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set build.print-step-timings --enable-verbose-tests" fi RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-sccache"