Skip to content

Commit

Permalink
cargo-ui tests: check that <dir>/src exists before processing test
Browse files Browse the repository at this point in the history
  • Loading branch information
ebroto committed May 25, 2020
1 parent 997a4a3 commit 492a49e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/compile-test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,11 @@ fn run_ui_cargo(config: &mut compiletest::Config) {
}

let src_path = case.path().join("src");
env::set_current_dir(&src_path)?;
if !src_path.exists() {
continue;
}

env::set_current_dir(&src_path)?;
for file in fs::read_dir(&src_path)? {
let file = file?;
if file.file_type()?.is_dir() {
Expand Down

0 comments on commit 492a49e

Please sign in to comment.