diff options
| author | bors <bors@rust-lang.org> | 2023-07-04 12:12:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-07-04 12:12:22 +0000 |
| commit | 7591c514368ff53207714cdf7c702addb1366cb5 (patch) | |
| tree | 65a1de3306da75337d277759f3bd32cb5c47f82d | |
| parent | 8fa48940a05a4a62c88493bd903ca746576b279a (diff) | |
| parent | da98baa493bb79a49903c83c7d700abae2335832 (diff) | |
| download | rust-7591c514368ff53207714cdf7c702addb1366cb5.tar.gz rust-7591c514368ff53207714cdf7c702addb1366cb5.zip | |
Auto merge of #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 #2958
| -rw-r--r-- | src/tools/miri/tests/compiletest.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/miri/tests/compiletest.rs b/src/tools/miri/tests/compiletest.rs index 73671e716ef..e07bb3c6efb 100644 --- a/src/tools/miri/tests/compiletest.rs +++ b/src/tools/miri/tests/compiletest.rs @@ -145,7 +145,8 @@ fn run_tests(mode: Mode, path: &str, target: &str, with_dependencies: bool) -> R // The files we're actually interested in (all `.rs` files). |path| { path.extension().is_some_and(|ext| ext == "rs") - && (filters.is_empty() || filters.iter().any(|f| path.starts_with(f))) + && (filters.is_empty() + || filters.iter().any(|f| path.display().to_string().contains(f))) }, // This could be used to overwrite the `Config` on a per-test basis. |_, _| None, |
