-
Notifications
You must be signed in to change notification settings - Fork 542
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
Bazel coverage report file is empty when loading py_binary with Python version specified #1600
Comments
It seems that lack of the attribute of And when I debug bazel server, there are no attribute of
I tried adding
I use the following bazel builtin code as a reference. Is there any thoughts on this? |
Great analysis. Thanks! Yeah, adding those attributes is probably whats missing. Maybe. There's a few more attributes mentioned in that Java code, but it's all undocumented. If adding those attributes with the coverage command gives the right output, then great. |
This PR is to fix an issue that coverage report is empty when using transition module. This is due to the absence of the `_lcov_merger` and `_collect_cc_coverage` attributes. Coverage reports will be created adding these attributes. Fixes #1600
🐞 bug report
Affected Rule
The issue is caused by the
py_binary
andpy_test
when runningbazel coverage
.Is this a regression?
No.
Description
When I load py_binary and py_test with Python version specified like below and run
bazel coverage
command, a coverage report file is empty.When I load these rules with the default Python version, the correct coverage report is created.
🔬 Minimal Reproduction
Here is an example repository.
https://github.com/tanan/bazel-python-coverage/tree/python-coverage-empty
I run the command:
On the other hand,
bazel coverage
creates a correct file when I load the default version ofpy_binary
andpy_test
. The sample repository is here:https://github.com/tanan/bazel-python-coverage/tree/python-coverage-success
The difference between the two codes is the URL below.
tanan/bazel-python-coverage@python-coverage-success...python-coverage-empty
🔥 Exception or Error
coverage file is empty with the log
WARNING: There was no coverage found
.🌍 Your Environment
Operating System:
Output of
bazel version
:Rules_python version:
Anything else relevant?
The text was updated successfully, but these errors were encountered: