Skip to content

Commit

Permalink
Auto merge of #2942 - oli-obk:ui_test_bump, r=RalfJung
Browse files Browse the repository at this point in the history
Make `--quiet` actually do something

address review from #2941 (comment)
  • Loading branch information
bors committed Jun 27, 2023
2 parents 7ee6988 + 4eb8e48 commit cfd3ea1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ libloading = "0.7"

[dev-dependencies]
colored = "2"
ui_test = "0.11"
ui_test = "0.11.6"
rustc_version = "0.4"
# Features chosen to match those required by env_logger, to avoid rebuilds
regex = { version = "1.5.5", default-features = false, features = ["perf", "std"] }
Expand Down
13 changes: 10 additions & 3 deletions tests/compiletest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use regex::bytes::Regex;
use std::ffi::OsString;
use std::path::{Path, PathBuf};
use std::{env, process::Command};
use ui_test::CommandBuilder;
use ui_test::{color_eyre::Result, Config, Match, Mode, OutputConflictHandling};
use ui_test::{status_emitter, CommandBuilder};

fn miri_path() -> PathBuf {
PathBuf::from(option_env!("MIRI").unwrap_or(env!("CARGO_BIN_EXE_miri")))
Expand Down Expand Up @@ -149,8 +149,15 @@ fn run_tests(mode: Mode, path: &str, target: &str, with_dependencies: bool) -> R
// This could be used to overwrite the `Config` on a per-test basis.
|_, _| None,
(
ui_test::status_emitter::Text,
ui_test::status_emitter::Gha::<false> { name: format!("{mode:?} {path} ({target})") },
if quiet {
Box::<status_emitter::Quiet>::default()
as Box<dyn status_emitter::StatusEmitter + Send>
} else {
Box::new(status_emitter::Text)
},
status_emitter::Gha::</* GHA Actions groups*/ false> {
name: format!("{mode:?} {path} ({target})"),
},
),
)
}
Expand Down

0 comments on commit cfd3ea1

Please sign in to comment.