about summary refs log tree commit diff
path: root/src/compiletest/common.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2016-02-25 16:14:05 +0100
committerSimon Sapin <simon.sapin@exyr.org>2016-03-15 17:59:01 +0100
commitbbb45c41df722a79efd7596c012ab6ba9c470b49 (patch)
tree9e44fca0cf629722401a591b3b08425d927d82ed /src/compiletest/common.rs
parentc116ae35cf49b55bd8d82e31f1ba030cf7e63867 (diff)
downloadrust-bbb45c41df722a79efd7596c012ab6ba9c470b49.tar.gz
rust-bbb45c41df722a79efd7596c012ab6ba9c470b49.zip
Shorter output for `rustc --test` binaries.
A program created with `rustc --test` prints at least one line per test.
This can be very verbose, especially with [data-driven tests](
https://internals.rust-lang.org/t/test-and-external-test-harnesses/3145)
when hundreds or thousands of tests is not rare.

This adds a `-q` or `--quiet` option that changes the output
to one character instead of one line per test
(except metrics and benchmarks results which have additional data to
show):

```
     Running target/debug/wpt-75c594dc1e6e6187

running 314 tests
..............................................................................
..............................................................................
..............................................................................
..............................................................................
..
test result: ok. 314 passed; 0 failed; 0 ignored; 0 measured
```

This is a breaking change since the `test::TestOpts` struct
now has one more field.
Diffstat (limited to 'src/compiletest/common.rs')
-rw-r--r--src/compiletest/common.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiletest/common.rs b/src/compiletest/common.rs
index e66094dc395..33ec974c527 100644
--- a/src/compiletest/common.rs
+++ b/src/compiletest/common.rs
@@ -155,5 +155,8 @@ pub struct Config {
     pub lldb_python_dir: Option<String>,
 
     // Explain what's going on
-    pub verbose: bool
+    pub verbose: bool,
+
+    // Print one character per test instead of one line
+    pub quiet: bool,
 }