-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Closed
Labels
P3We're not considering working on this, but happy to review a PR. (No assignee)We're not considering working on this, but happy to review a PR. (No assignee)team-Rules-JavaIssues for Java rulesIssues for Java rulesteam-Rules-PythonNative rules for PythonNative rules for Pythontype: bug
Description
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)",
},
)Metadata
Metadata
Assignees
Labels
P3We're not considering working on this, but happy to review a PR. (No assignee)We're not considering working on this, but happy to review a PR. (No assignee)team-Rules-JavaIssues for Java rulesIssues for Java rulesteam-Rules-PythonNative rules for PythonNative rules for Pythontype: bug