Skip to content

Commit

Permalink
feat: follow symbolic link to search test case files (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelScofield authored Feb 13, 2023
1 parent 1ff2ea7 commit e6d602e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ pub struct Config {
#[builder(default = "Config::default_test_filter()")]
#[serde(default = "Config::default_test_filter")]
pub test_filter: String,
/// Whether follow symbolic links when searching test case files.
/// Defaults to "false" (not follow symbolic links).
#[builder(default = "false")]
#[serde(default = "Config::default_follow_links")]
pub follow_links: bool,
}

impl Config {
Expand All @@ -59,4 +64,8 @@ impl Config {
fn default_test_filter() -> String {
"".to_string()
}

fn default_follow_links() -> bool {
false
}
}
1 change: 1 addition & 0 deletions src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ impl<E: EnvController> Runner<E> {

let test_case_extension = self.config.test_case_extension.as_str();
let mut cases: Vec<_> = WalkDir::new(&root)
.follow_links(self.config.follow_links)
.into_iter()
.filter_map(|entry| {
entry
Expand Down

0 comments on commit e6d602e

Please sign in to comment.