diff --git a/src/test/mod.rs b/src/test/mod.rs index 4bad8e71481..87ec9f510af 100644 --- a/src/test/mod.rs +++ b/src/test/mod.rs @@ -90,9 +90,15 @@ where } fn is_file_skip(path: &Path) -> bool { - FILE_SKIP_LIST - .iter() - .any(|file_path| is_subpath(path, file_path)) + let filter_file = std::env::var("TEST_FILE").ok(); + let skip_file = filter_file + .map(|filter_file| !path.to_str().unwrap().contains(&filter_file)) + .unwrap_or(false); + + skip_file + || FILE_SKIP_LIST + .iter() + .any(|file_path| is_subpath(path, file_path)) } // Returns a `Vec` containing `PathBuf`s of files with an `rs` extension in the