Skip to content

Commit ffdc140

Browse files
committed
Bump ui_test to 0.19.1
1 parent 11d8e55 commit ffdc140

File tree

2 files changed

+7
-19
lines changed

2 files changed

+7
-19
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ tempfile = { version = "3.2", optional = true }
2727
termize = "0.1"
2828

2929
[dev-dependencies]
30-
ui_test = "0.18.1"
30+
ui_test = "0.19.1"
3131
tester = "0.9"
3232
regex = "1.5"
3333
toml = "0.7.3"

tests/compile-test.rs

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#![warn(rust_2018_idioms, unused_lifetimes)]
55
#![allow(unused_extern_crates)]
66

7-
use ui_test::{status_emitter, Args, CommandBuilder, Config, Match, Mode, OutputConflictHandling};
7+
use ui_test::{status_emitter, Args, CommandBuilder, Config, Match, Mode};
88

99
use std::collections::BTreeMap;
1010
use std::env::{self, set_var, var_os};
@@ -120,26 +120,17 @@ fn base_config(test_dir: &str) -> (Config, Args) {
120120
filters: env::var("TESTNAME")
121121
.map(|filters| filters.split(',').map(str::to_string).collect())
122122
.unwrap_or_default(),
123-
quiet: false,
124-
check: !bless,
125-
threads: match std::env::var_os("RUST_TEST_THREADS") {
126-
Some(n) => n.to_str().unwrap().parse().unwrap(),
127-
None => std::thread::available_parallelism().unwrap(),
128-
},
129-
skip: Vec::new(),
130-
};
123+
..Args::default(bless).unwrap()
124+
}
125+
.parse_args(env::args().skip(1))
126+
.unwrap();
131127

132128
let mut config = Config {
133129
mode: Mode::Yolo {
134130
rustfix: ui_test::RustfixMode::Everything,
135131
},
136132
stderr_filters: vec![(Match::PathBackslash, b"/")],
137133
stdout_filters: vec![],
138-
output_conflict_handling: if bless {
139-
OutputConflictHandling::Bless
140-
} else {
141-
OutputConflictHandling::Error("cargo uibless".into())
142-
},
143134
target: None,
144135
out_dir: canonicalize(var_os("CARGO_TARGET_DIR").unwrap_or_else(|| "target".into())).join("ui_test"),
145136
..Config::rustc(Path::new("tests").join(test_dir))
@@ -203,10 +194,7 @@ fn run_internal_tests() {
203194
if !RUN_INTERNAL_TESTS {
204195
return;
205196
}
206-
let (mut config, args) = base_config("ui-internal");
207-
if let OutputConflictHandling::Error(err) = &mut config.output_conflict_handling {
208-
*err = "cargo uitest --features internal -- -- --bless".into();
209-
}
197+
let (config, args) = base_config("ui-internal");
210198
let quiet = args.quiet;
211199

212200
ui_test::run_tests_generic(

0 commit comments

Comments
 (0)