Skip to content

Commit e58f419

Browse files
committed
Don't run UI tests on cargo collect-metadata
1 parent 5873cb9 commit e58f419

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tests/compile-test.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,16 @@ impl TestContext {
141141

142142
fn base_config(&self, test_dir: &str) -> Config {
143143
let target_dir = PathBuf::from(var_os("CARGO_TARGET_DIR").unwrap_or_else(|| "target".into()));
144+
let filter_files = if self.diagnostic_collector.is_some() {
145+
vec!["DO_NOT_RUN_UI_TESTS".to_string()]
146+
} else {
147+
env::var("TESTNAME")
148+
.map(|filters| filters.split(',').map(str::to_string).collect())
149+
.unwrap_or_default()
150+
};
144151
let mut config = Config {
145152
output_conflict_handling: OutputConflictHandling::Error,
146-
filter_files: env::var("TESTNAME")
147-
.map(|filters| filters.split(',').map(str::to_string).collect())
148-
.unwrap_or_default(),
153+
filter_files,
149154
target: None,
150155
bless_command: Some("cargo uibless".into()),
151156
out_dir: target_dir.join("ui_test"),

0 commit comments

Comments
 (0)