-
Notifications
You must be signed in to change notification settings - Fork 110
Replace setTestFilter
with makeTestFilter
.
#153
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
Conversation
`setTestFilter` is too rigid because it replaces the existing test filter and that makes composition harder than it needs to be. Let's replace it with a function that returns a test filter which can then be composed: ```swift let idFilter = makeTestFilter(matching: myTestIDs) func canHaveAPony(_ test: Test) -> Bool { ... } configuration.testFilter = { test in idFilter(test) && canHaveAPony(test) } ``` Resolves rdar://119205417.
@swift-ci please test |
|
||
// MARK: - Test filter factory functions | ||
|
||
/// Filter tests to run to those specified via a set of test IDs. |
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.
Can we update the wording of these two factory functions? Now, they don't perform the filtering, but only generate a filter
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.
Oh, sure.
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.
LGTM aside from documentation suggestion
@swift-ci please test |
This PR refines the previous PR for this issue, #153. It removes the internal overload of `makeTestFilter(matching:uncheckedTestFilter:)` because it is redundant: since the result needs to be passed to `uncheckedTestFilter` to preserve its lack of `isHidden`-checking, it doesn't _also_ need to impose its own check. I did add an internal overload of `makeTestFilter()` to the test target that just returns `selection.contains` as a convenience. Resolves rdar://119205417 (again.)
* Refine `makeTestFilter()` further. This PR refines the previous PR for this issue, #153. It removes the internal overload of `makeTestFilter(matching:uncheckedTestFilter:)` because it is redundant: since the result needs to be passed to `uncheckedTestFilter` to preserve its lack of `isHidden`-checking, it doesn't _also_ need to impose its own check. I did add an internal overload of `makeTestFilter()` to the test target that just returns `selection.contains` as a convenience. Resolves rdar://119205417 (again.)
setTestFilter
is too rigid because it replaces the existing test filter and that makes composition harder than it needs to be. Let's replace it with a function that returns a test filter which can then be composed:Resolves rdar://119205417.
Checklist: