-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libtest: add glob support to test name filters
Tests can currently only be filtered by substring or exact match. This makes it difficult to have finer-grained control over which tests to run, such as running only tests with a given suffix in a module, all tests without a given suffix, etc. This PR adds a `--glob` flag to make test name filters use glob patterns instead of string substring matching. This allows commands such as: --glob mymod::*_fast or --glob --skip *_slow The `--glob` flag can normally be omitted, as it is inferred whenever a pattern includes one of the glob special characters (`*`, `?`, or `[`). These characters cannot appear in ordinary test names, so this should not cause unexpected results. If both `--exact` *and* `--glob` are given, `--exact` takes precedence. Fixes #46408.
- Loading branch information
Showing
5 changed files
with
64 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,5 @@ crate-type = ["dylib", "rlib"] | |
|
||
[dependencies] | ||
getopts = "0.2" | ||
glob = "0.2" | ||
term = { path = "../libterm" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters