Skip to content

Commit

Permalink
Don't run UI tests on cargo collect-metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
flip1995 committed Oct 23, 2024
1 parent 5873cb9 commit e58f419
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tests/compile-test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,16 @@ impl TestContext {

fn base_config(&self, test_dir: &str) -> Config {
let target_dir = PathBuf::from(var_os("CARGO_TARGET_DIR").unwrap_or_else(|| "target".into()));
let filter_files = if self.diagnostic_collector.is_some() {
vec!["DO_NOT_RUN_UI_TESTS".to_string()]
} else {
env::var("TESTNAME")
.map(|filters| filters.split(',').map(str::to_string).collect())
.unwrap_or_default()
};
let mut config = Config {
output_conflict_handling: OutputConflictHandling::Error,
filter_files: env::var("TESTNAME")
.map(|filters| filters.split(',').map(str::to_string).collect())
.unwrap_or_default(),
filter_files,
target: None,
bless_command: Some("cargo uibless".into()),
out_dir: target_dir.join("ui_test"),
Expand Down

0 comments on commit e58f419

Please sign in to comment.