-
Notifications
You must be signed in to change notification settings - Fork 264
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
Add _lcov_merger attribute to test rules #691
Conversation
This is required to use `--combined_report=lcov` with `bazel coverage`
It's a bit more complicated than this. Based on bazelbuild/bazel#8477, we would also want this to be a late-bound default so that it only applies for coverage-enabled builds; otherwise, regular I wish it was clearer why every test rule needs to have a dependency on this tool instead of it just being something that Bazel handles on its own. I guess because it has to run the tool in the scope of the test action? If this is meant to be a supported path for coverage, there's no documentation about Another oddity is that Bazel's definition of I'd like to understand why that "some other way" wasn't feasible for Bazel, because if we do have to add this for Bazel to support coverage, we'll also need to update our workflows to exclude the attribute from our internal version of the rules since it's not needed (and could potentially conflict with other stuff Blaze is doing). |
We talked offline a bit here and we're going to try and find some way to late bind this attribute, since there doesn't seem to be an API to do this at the moment based on whether or not coverage is enabled. |
Filed an issue for discussion here bazelbuild/bazel#10642 |
For now the suggested workaround is to use |
As of bazel 5.1 this can be used as a late bound attribute bazelbuild/bazel@14d8be0 This alleviates the concerns from #691 and allows users to use this feature, and avoid having to pass `LCOV_MERGER` in the environment manually
As of bazel 5.1 this can be used as a late bound attribute bazelbuild/bazel@14d8be0 This alleviates the concerns from #691 and allows users to use this feature, and avoid having to pass `LCOV_MERGER` in the environment manually
As of bazel 5.1 this can be used as a late bound attribute bazelbuild/bazel@14d8be0 This alleviates the concerns from #691 and allows users to use this feature, and avoid having to pass `LCOV_MERGER` in the environment manually
This is required to use
--combined_report=lcov
withbazel coverage