Skip to content

Commit 1df9110

Browse files
committed
Auto merge of #11043 - Alexendoo:testname, r=Jarcho
Use substring matching for TESTNAME Restores the previous behaviour of matching using a substring match rather than needing a full match changelog: none
2 parents 9e57657 + 8647e29 commit 1df9110

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

tests/compile-test.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,7 @@ fn base_config(test_dir: &str) -> compiletest::Config {
6464
fn test_filter() -> Box<dyn Sync + Fn(&Path) -> bool> {
6565
if let Ok(filters) = env::var("TESTNAME") {
6666
let filters: Vec<_> = filters.split(',').map(ToString::to_string).collect();
67-
Box::new(move |path| {
68-
filters.is_empty()
69-
|| filters
70-
.iter()
71-
.any(|f| path.file_stem().map_or(false, |stem| stem == f.as_str()))
72-
})
67+
Box::new(move |path| filters.iter().any(|f| path.to_string_lossy().contains(f)))
7368
} else {
7469
Box::new(|_| true)
7570
}

0 commit comments

Comments
 (0)