Skip to content

Commit

Permalink
Make --quiet actually do something
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Jun 27, 2023
1 parent 732f127 commit 0ba4cdb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/tools/miri/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -842,9 +842,9 @@ dependencies = [

[[package]]
name = "ui_test"
version = "0.11.0"
version = "0.11.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b75049e51d3db204b2de79c8ff7a8675c628d81ceef6ec97598c1ab7d4d66802"
checksum = "24a2e70adc9d18b9b4dd80ea57aeec447103c6fbb354a07c080adad451c645e1"
dependencies = [
"bstr",
"cargo-platform",
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/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 src/tools/miri/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 0ba4cdb

Please sign in to comment.