Skip to content

Commit 7591c51

Browse files
committed
Auto merge of rust-lang#2960 - oli-obk:run_filter, r=oli-obk
Restore test filtering by substring. Previously it was only looking for tests whose path was a prefix of the given filter fixes rust-lang#2958
2 parents 8fa4894 + da98baa commit 7591c51

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)