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.
This commit is contained in:
parent
1222b7a9d1
commit
6ac0787ff3
3 changed files with 16 additions and 7 deletions
|
@ -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,14 +358,15 @@ 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);
|
||||
|
||||
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
|
||||
/// by a `Cargo.toml`
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue