about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2017-05-22 04:27:47 +0800
committerkennytm <kennytm@gmail.com>2017-06-02 01:22:37 +0800
commit6ac0787ff349dd6df81bb84e673b1b4881f9e856 (patch)
tree1b77805211d5fe2e8528e096fe4deb0d01695885 /src
parent1222b7a9d1d30e680aad263c16cb0b09c2675e7b (diff)
downloadrust-6ac0787ff349dd6df81bb84e673b1b4881f9e856.tar.gz
rust-6ac0787ff349dd6df81bb84e673b1b4881f9e856.zip
ci: Further tone down the test verbosity.
When `--quiet` is passed to rustbuild, suppress rustdoc test output unless
failure.

Added a `--quiet` flag to `tidy`, which suppresses the features table.

The actual `--quiet` flag is enabled in #42354.

Since details of failed tests will still be printed, and the name of slow
tests taking >60 to runtime will also be printed, the debugging difficulty
caused by information loss should be minimal; but it is very worthwhile to
keep the log under 10000 lines on Travis CI so that common errors can be
spotted without reading the raw log.
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/check.rs14
-rw-r--r--src/tools/tidy/src/features.rs6
-rw-r--r--src/tools/tidy/src/main.rs3
3 files changed, 16 insertions, 7 deletions
diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs
index dc0f79a32c2..d51e3102d8a 100644
--- a/src/bootstrap/check.rs
+++ b/src/bootstrap/check.rs
@@ -132,6 +132,9 @@ pub fn tidy(build: &Build, host: &str) {
     if !build.config.vendor {
         cmd.arg("--no-vendor");
     }
+    if build.config.quiet_tests {
+        cmd.arg("--quiet");
+    }
     build.run(&mut cmd);
 }
 
@@ -355,13 +358,14 @@ fn markdown_test(build: &Build, compiler: &Compiler, markdown: &Path) {
     cmd.arg(markdown);
     cmd.env("RUSTC_BOOTSTRAP", "1");
 
-    let mut test_args = build.flags.cmd.test_args().join(" ");
-    if build.config.quiet_tests {
-        test_args.push_str(" --quiet");
-    }
+    let test_args = build.flags.cmd.test_args().join(" ");
     cmd.arg("--test-args").arg(test_args);
 
-    build.run(&mut cmd);
+    if build.config.quiet_tests {
+        build.run_quiet(&mut cmd);
+    } else {
+        build.run(&mut cmd);
+    }
 }
 
 /// Run all unit tests plus documentation tests for an entire crate DAG defined
diff --git a/src/tools/tidy/src/features.rs b/src/tools/tidy/src/features.rs
index 791b8d77e0b..e34821e3584 100644
--- a/src/tools/tidy/src/features.rs
+++ b/src/tools/tidy/src/features.rs
@@ -49,7 +49,7 @@ pub struct Feature {
     pub has_gate_test: bool,
 }
 
-pub fn check(path: &Path, bad: &mut bool) {
+pub fn check(path: &Path, bad: &mut bool, quiet: bool) {
     let mut features = collect_lang_features(path);
     assert!(!features.is_empty());
 
@@ -134,6 +134,10 @@ pub fn check(path: &Path, bad: &mut bool) {
     if *bad {
         return;
     }
+    if quiet {
+        println!("* {} features", features.len());
+        return;
+    }
 
     let mut lines = Vec::new();
     for (name, feature) in features.iter() {
diff --git a/src/tools/tidy/src/main.rs b/src/tools/tidy/src/main.rs
index 6b666fa809f..23a31131f7a 100644
--- a/src/tools/tidy/src/main.rs
+++ b/src/tools/tidy/src/main.rs
@@ -57,11 +57,12 @@ fn main() {
     let args: Vec<String> = env::args().skip(1).collect();
 
     let mut bad = false;
+    let quiet = args.iter().any(|s| *s == "--quiet");
     bins::check(&path, &mut bad);
     style::check(&path, &mut bad);
     errors::check(&path, &mut bad);
     cargo::check(&path, &mut bad);
-    features::check(&path, &mut bad);
+    features::check(&path, &mut bad, quiet);
     pal::check(&path, &mut bad);
     unstable_book::check(&path, &mut bad);
     if !args.iter().any(|s| *s == "--no-vendor") {