-
Notifications
You must be signed in to change notification settings - Fork 138
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
Implement --test_filter support #999
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
@keith The current test suite validates the following:
However 2 can currently be subverted if zero tests are executed (e.g. you specify a filter that matches no tests). Given this, I'd like to validate that the tests are actually executed, for example:
Is it possible to write tests against the test log output (or another test artifact)? There might be a better way to assert against this output, or perhaps this is not a desirable test. Open to suggestions / feedback either way. Thanks! |
blah yea, i think you might be able to with a shell test, but that is worse in other ways, so i think this is probably good enough for now |
Thanks! |
This is loosely based on #999, but includes support for Linux as well as Apple platforms. PiperOrigin-RevId: 513859254
Implement `--test_filter` support, as detailed in bazelbuild#997. This can be engaged via a `swift_test` target like so: ``` bazel test //:Tests --test_filter=TestModuleName.TestClassName/testMethodName ``` **Note:** If `--test_filter` is not passed into the test invocation, we fallback to the original behavior (pass `All` into the xctest invocation.
Description
Implement
--test_filter
support, as detailed in #997. This can be engaged via aswift_test
target like so:Note: If
--test_filter
is not passed into the test invocation, we fallback to the original behavior (passAll
into the xctest invocation.Changelog
test_filter
, allowing users to inject a specific test scope intoswift_test
executionTODO