Description of the problem / feature request:
Any java_test or py_test that executes a cc_binary at runtime will not report coverage for the cc_binary's sources.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Reproducers are available as integration tests for Java and Python.
What operating system are you running Bazel on?
Linux
What's the output of bazel info release?
5.0.0, 5.1.0rc3 (but also affects HEAD)
Have you found anything relevant by searching the web?
No
Any other information, logs, or outputs that you want to share?
I submitted fixes as #15096 (Java) and #15097 (Python).
Individual test targets can work around this issue by adding:
*_test(
...,
data = [
...,
"@bazel_tools//tools/test:collect_cc_coverage.sh"
],
env = {
...,
"CC_CODE_COVERAGE_SCRIPT": "$$RUNFILES_DIR/$$TEST_WORKSPACE/$(execpath @bazel_tools//tools/test:collect_cc_coverage.sh)",
},
)
Description of the problem / feature request:
Any
java_testorpy_testthat executes acc_binaryat runtime will not report coverage for thecc_binary's sources.Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Reproducers are available as integration tests for Java and Python.
What operating system are you running Bazel on?
Linux
What's the output of
bazel info release?5.0.0, 5.1.0rc3 (but also affects HEAD)
Have you found anything relevant by searching the web?
No
Any other information, logs, or outputs that you want to share?
I submitted fixes as #15096 (Java) and #15097 (Python).
Individual test targets can work around this issue by adding: