Skip to content

Commit da98baa

Browse files
committed
Restore test filtering by substring.
Previously it was only looking for tests whose path was a prefix of the given filter
1 parent 89c2596 commit da98baa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tools/miri/tests/compiletest.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ fn run_tests(mode: Mode, path: &str, target: &str, with_dependencies: bool) -> R
145145
// The files we're actually interested in (all `.rs` files).
146146
|path| {
147147
path.extension().is_some_and(|ext| ext == "rs")
148-
&& (filters.is_empty() || filters.iter().any(|f| path.starts_with(f)))
148+
&& (filters.is_empty()
149+
|| filters.iter().any(|f| path.display().to_string().contains(f)))
149150
},
150151
// This could be used to overwrite the `Config` on a per-test basis.
151152
|_, _| None,

0 commit comments

Comments
 (0)