Commit 7b45c59
authored
fix(coverage): produce combined coverage report (#520)
Bazel is not producing combined coverage report for targets that don't
define the `_lcov_merger` attribute, the `collect_coverage.sh` script
just exits silently in this case:
https://github.com/bazelbuild/bazel/blob/fde4b67009d377a3543a3dc8481147307bd37d36/tools/test/collect_coverage.sh#L186-L194
Since `rules_python` defines this attribute both for `py_binary` and
`py_test`, we're mirroring this behavior by modifying `py_base.attrs`.
Tested by applying the patch and verifying that
`bazel-out/_coverage/_coverage_report.dat` is not empty after running
`bazel coverage --combined_report=lcov [target]`.1 parent a23ffaa commit 7b45c59
1 file changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
178 | 185 | | |
179 | 186 | | |
180 | 187 | | |
| |||
0 commit comments