Skip to content

Commit

Permalink
Auto merge of rust-lang#51367 - oli-obk:silence!_I_test_you, r=Mark-S…
Browse files Browse the repository at this point in the history
…imulacrum

Use quiet tests by default

r? @eddyb
  • Loading branch information
bors committed Jun 19, 2018
2 parents a646c91 + 0c1bcd3 commit 6ec1b62
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 18 deletions.
6 changes: 3 additions & 3 deletions config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -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 = false
# 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)
Expand Down
6 changes: 3 additions & 3 deletions src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<PathBuf>,
pub print_step_timings: bool,
Expand Down Expand Up @@ -301,7 +301,7 @@ struct Rust {
ignore_git: Option<bool>,
debug: Option<bool>,
dist_src: Option<bool>,
quiet_tests: Option<bool>,
verbose_tests: Option<bool>,
test_miri: Option<bool>,
incremental: Option<bool>,
save_toolstates: Option<String>,
Expand Down Expand Up @@ -528,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 {
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
14 changes: 7 additions & 7 deletions src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down Expand Up @@ -1086,7 +1086,7 @@ impl Step for Compiletest {
cmd.arg("--verbose");
}

if builder.config.quiet_tests {
if !builder.config.verbose_tests {
cmd.arg("--quiet");
}

Expand Down Expand Up @@ -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)
}
}

Expand Down Expand Up @@ -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");
}

Expand Down Expand Up @@ -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");
}

Expand Down
6 changes: 2 additions & 4 deletions src/ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 6ec1b62

Please sign in to comment.