Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/tools/compiletest/src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,14 @@ fn filter_tests(opts: &Config, tests: Vec<CollectedTest>) -> Vec<CollectedTest>
let mut filtered = tests;

let matches_filter = |test: &CollectedTest, filter_str: &str| {
let filterable_path = test.desc.filterable_path.as_str();
if opts.filter_exact {
filterable_path == filter_str
// When `--exact` is used we must use `filterable_path` to get
// reasonable filtering behavior.
test.desc.filterable_path.as_str() == filter_str
} else {
filterable_path.contains(filter_str)
// For compatibility we use the name (which includes the full path)
// if `--exact` is not used.
test.desc.name.contains(filter_str)
}
};

Expand Down
Loading