Skip to content

Commit 57fc4fe

Browse files
committed
cargo-ui tests: check that <dir>/src exists before processing test
1 parent 6d80e7d commit 57fc4fe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/compile-test.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,11 @@ fn run_ui_cargo(config: &mut compiletest::Config) {
181181
}
182182

183183
let src_path = case.path().join("src");
184-
env::set_current_dir(&src_path)?;
184+
if !src_path.exists() {
185+
continue;
186+
}
185187

188+
env::set_current_dir(&src_path)?;
186189
for file in fs::read_dir(&src_path)? {
187190
let file = file?;
188191
if file.file_type()?.is_dir() {

0 commit comments

Comments
 (0)