Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 577
[tests] option to include/exclude categories from Test APKs#1024
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -146,12 +146,22 @@ protected void AddTest (Assembly assembly) | ||
| protected virtual IEnumerable <string> GetIncludedCategories () | ||
| { | ||
| return null; | ||
| string include = arguments?.GetString ("include"); | ||
| if (!string.IsNullOrEmpty (include)) { | ||
| foreach (var category in include.Split (':')) { | ||
| yield return category; | ||
| } | ||
| } | ||
| } | ||
| protected virtual IEnumerable <string> GetExcludedCategories () | ||
| { | ||
| return null; | ||
MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of returning null, these will be the equivalent of Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
| ||
| string exclude = arguments?.GetString ("exclude"); | ||
| if (!string.IsNullOrEmpty (exclude)) { | ||
| foreach (var category in exclude.Split (':')) { | ||
| yield return category; | ||
| } | ||
| } | ||
| } | ||
| protected virtual void UpdateFilter () | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is better: it lets you specify include/exclude at the same time.
My example that worked:
Of course no category is named
Bologna, but the command in the log was: