bazel: Code coverage does not honor "exclusive" tag
Description of the problem / feature request:
I have tests marked as exclusive
, and when I run bazel test //...
, they run serially. When I run with code coverage:
bazel coverage //... \
--combined_report=lcov \
--coverage_report_generator=@bazel_tools//tools/test/LcovMerger/java/com/google/devtools/lcovmerger:Main \
--experimental_java_coverage && genhtml -o coverage bazel-out/_coverage/_coverage_report.dat && open coverage/index.html
they run in parallel.
Feature requests: what underlying problem are you trying to solve with this feature?
bazel coverage
should honor exclusive
tag.
Bugs: what’s the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Check out https://github.com/batfish/batfish/ at 7ac4e23ea8f3887a74f2c1a56e744df7750c2217 and run the above command.
What operating system are you running Bazel on?
Mac OS X 10.13.6 (17G65)
What’s the output of bazel info release
?
development version
If bazel info release
returns “development version” or “(@non-git)”, tell us how you built Bazel.
bazel build //src:bazel @ commit d0196514e12bf09d9548160604fdae4c40063654
Need latest features for the code coverage magic.
What’s the output of git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
?
git@github.com:bazelbuild/bazel.git
d0196514e12bf09d9548160604fdae4c40063654
d0196514e12bf09d9548160604fdae4c40063654
Have you found anything relevant by searching the web?
No
Any other information, logs, or outputs that you want to share?
No
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 15 (8 by maintainers)
Bump, this is still a problem in 2023 😲
My team has also encountered this issue. Our workaround is to exclude must-be-run-serially tests from our coverage report, but that artificially reduces our reported coverage. Ideally, we’d be able to generate coverage using all test targets.
It looks like jacoco was upgraded in https://github.com/iirina/bazel/commit/f90cc57c112e3b3b2f0d8c070795222450cab631. Are there any other blockers?