Skip to content

Commit b567773

Browse files
committed
Auto merge of rust-lang#2942 - oli-obk:ui_test_bump, r=RalfJung
Make `--quiet` actually do something address review from rust-lang/miri#2941 (comment)
2 parents 3917774 + 0ba4cdb commit b567773

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

src/tools/miri/Cargo.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -842,9 +842,9 @@ dependencies = [
842842

843843
[[package]]
844844
name = "ui_test"
845-
version = "0.11.0"
845+
version = "0.11.6"
846846
source = "registry+https://github.com/rust-lang/crates.io-index"
847-
checksum = "b75049e51d3db204b2de79c8ff7a8675c628d81ceef6ec97598c1ab7d4d66802"
847+
checksum = "24a2e70adc9d18b9b4dd80ea57aeec447103c6fbb354a07c080adad451c645e1"
848848
dependencies = [
849849
"bstr",
850850
"cargo-platform",

src/tools/miri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ libloading = "0.7"
3636

3737
[dev-dependencies]
3838
colored = "2"
39-
ui_test = "0.11"
39+
ui_test = "0.11.6"
4040
rustc_version = "0.4"
4141
# Features chosen to match those required by env_logger, to avoid rebuilds
4242
regex = { version = "1.5.5", default-features = false, features = ["perf", "std"] }

src/tools/miri/tests/compiletest.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ use regex::bytes::Regex;
33
use std::ffi::OsString;
44
use std::path::{Path, PathBuf};
55
use std::{env, process::Command};
6-
use ui_test::CommandBuilder;
76
use ui_test::{color_eyre::Result, Config, Match, Mode, OutputConflictHandling};
7+
use ui_test::{status_emitter, CommandBuilder};
88

99
fn miri_path() -> PathBuf {
1010
PathBuf::from(option_env!("MIRI").unwrap_or(env!("CARGO_BIN_EXE_miri")))
@@ -149,8 +149,15 @@ fn run_tests(mode: Mode, path: &str, target: &str, with_dependencies: bool) -> R
149149
// This could be used to overwrite the `Config` on a per-test basis.
150150
|_, _| None,
151151
(
152-
ui_test::status_emitter::Text,
153-
ui_test::status_emitter::Gha::<false> { name: format!("{mode:?} {path} ({target})") },
152+
if quiet {
153+
Box::<status_emitter::Quiet>::default()
154+
as Box<dyn status_emitter::StatusEmitter + Send>
155+
} else {
156+
Box::new(status_emitter::Text)
157+
},
158+
status_emitter::Gha::</* GHA Actions groups*/ false> {
159+
name: format!("{mode:?} {path} ({target})"),
160+
},
154161
),
155162
)
156163
}

0 commit comments

Comments
 (0)