From 9fd026a96c6ddc8611c77924d2bcd956dc798a0e Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Tue, 5 Jun 2018 15:00:44 +0200 Subject: [PATCH 1/2] Use quiet tests by default --- config.toml.example | 2 +- src/bootstrap/config.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config.toml.example b/config.toml.example index 5054a8f44b971..a72217e0e2167 100644 --- a/config.toml.example +++ b/config.toml.example @@ -303,7 +303,7 @@ # Suppresses extraneous output from tests to ensure the output of the test # harness is relatively clean. -#quiet-tests = false +#quiet-tests = true # 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 47feb8a8ab66d..dee2c400a295e 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -347,6 +347,7 @@ 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; From 0c1bcd3871d08490fbe9aa5368a0cf043aeb5683 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Thu, 7 Jun 2018 14:40:36 +0200 Subject: [PATCH 2/2] 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 a72217e0e2167..feb55d57ef3e1 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 dee2c400a295e..11e0b6900b006 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 3574b7d210a2d..446db9c0a9e28 100755 --- a/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py @@ -47,7 +47,7 @@ def v(*args): 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 a0b6222421d71..25a8116ff2a87 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 456f8cc7317e7..5b1fb676187b1 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"