Skip to content

Commit 18f8310

Browse files
committed
Bump ui_test
1 parent 928f306 commit 18f8310

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

src/tools/miri/Cargo.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,9 +1051,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
10511051

10521052
[[package]]
10531053
name = "ui_test"
1054-
version = "0.26.5"
1054+
version = "0.27.1"
10551055
source = "registry+https://github.com/rust-lang/crates.io-index"
1056-
checksum = "32ee4c40e5a5f9fa6864ff976473e5d6a6e9884b6ce68b40690d9f87e1994c83"
1056+
checksum = "180a1250feba0214b892e22c3a14e9f6688cc084d7b45ec4672106fcb7914641"
10571057
dependencies = [
10581058
"annotate-snippets",
10591059
"anyhow",

src/tools/miri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ windows-sys = { version = "0.52", features = [
4747
] }
4848

4949
[dev-dependencies]
50+
ui_test = "0.27.1"
5051
colored = "2"
51-
ui_test = "0.26.5"
5252
rustc_version = "0.4"
5353
regex = "1.5.5"
5454
tempfile = "3"

src/tools/miri/tests/ui.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use ui_test::custom_flags::edition::Edition;
1313
use ui_test::dependencies::DependencyBuilder;
1414
use ui_test::per_test_config::TestConfig;
1515
use ui_test::spanned::Spanned;
16-
use ui_test::{CommandBuilder, Config, Format, Match, OutputConflictHandling, status_emitter};
16+
use ui_test::{CommandBuilder, Config, Format, Match, ignore_output_conflict, status_emitter};
1717

1818
#[derive(Copy, Clone, Debug)]
1919
enum Mode {
@@ -82,7 +82,9 @@ fn build_native_lib() -> PathBuf {
8282
native_lib_path
8383
}
8484

85-
struct WithDependencies {}
85+
struct WithDependencies {
86+
bless: bool,
87+
}
8688

8789
/// Does *not* set any args or env vars, since it is shared between the test runner and
8890
/// run_dep_mode.
@@ -126,7 +128,7 @@ fn miri_config(
126128
// keep in sync with `./miri run`
127129
config.comment_defaults.base().add_custom("edition", Edition("2021".into()));
128130

129-
if let Some(WithDependencies {}) = with_dependencies {
131+
if let Some(WithDependencies { bless }) = with_dependencies {
130132
config.comment_defaults.base().set_custom("dependencies", DependencyBuilder {
131133
program: CommandBuilder {
132134
// Set the `cargo-miri` binary, which we expect to be in the same folder as the `miri` binary.
@@ -141,6 +143,7 @@ fn miri_config(
141143
},
142144
crate_manifest_path: Path::new("test_dependencies").join("Cargo.toml"),
143145
build_std: None,
146+
bless_lockfile: bless,
144147
});
145148
}
146149
config
@@ -157,15 +160,15 @@ fn run_tests(
157160
let mut args = ui_test::Args::test()?;
158161
args.bless |= env::var_os("RUSTC_BLESS").is_some_and(|v| v != "0");
159162

160-
let with_dependencies = with_dependencies.then_some(WithDependencies {});
163+
let with_dependencies = with_dependencies.then_some(WithDependencies { bless: args.bless });
161164

162165
let mut config = miri_config(target, path, mode, with_dependencies);
163166
config.with_args(&args);
164167
config.bless_command = Some("./miri test --bless".into());
165168

166169
if env::var_os("MIRI_SKIP_UI_CHECKS").is_some() {
167170
assert!(!args.bless, "cannot use RUSTC_BLESS and MIRI_SKIP_UI_CHECKS at the same time");
168-
config.output_conflict_handling = OutputConflictHandling::Ignore;
171+
config.output_conflict_handling = ignore_output_conflict;
169172
}
170173

171174
// Add a test env var to do environment communication tests.
@@ -337,7 +340,8 @@ fn main() -> Result<()> {
337340
}
338341

339342
fn run_dep_mode(target: String, args: impl Iterator<Item = OsString>) -> Result<()> {
340-
let mut config = miri_config(&target, "", Mode::RunDep, Some(WithDependencies {}));
343+
let mut config =
344+
miri_config(&target, "", Mode::RunDep, Some(WithDependencies { bless: false }));
341345
config.comment_defaults.base().custom.remove("edition"); // `./miri` adds an `--edition` in `args`, so don't set it twice
342346
config.fill_host_and_target()?;
343347
config.program.args = args.collect();

0 commit comments

Comments
 (0)