DO-NOT-MERGE: Patched-on LCOV file format support for coveragepy v4.x#863
Closed
gpshead wants to merge 1 commit intocoveragepy:v4.5.xfrom
Closed
DO-NOT-MERGE: Patched-on LCOV file format support for coveragepy v4.x#863gpshead wants to merge 1 commit intocoveragepy:v4.5.xfrom
gpshead wants to merge 1 commit intocoveragepy:v4.5.xfrom
Conversation
This is gross, it was done in a way that minized diffs. Reworking this to be non-ugly code for proper support in coveragepy would be great. I'm making the PR on a branch of v4.5.x as our existing changes do not apply cleanly after some of the refactoring in the git master (v5) code. We're still using patched 4.4.2 internally at the time of PR creation.
Member
|
@gpshead Thanks. I have to admit, when I saw you started with "this is gross," I thought, "come on, how gross could it be?" Then I looked at the diffs... :) Is there a reference anywhere for the lcov file format? I found this: http://ltp.sourceforge.net/coverage/lcov/geninfo.1.php |
Member
|
Oops, that was already in #587 (slurps coffee). |
Member
|
@gpshead a couple of questions:
|
ulfjack
added a commit
to ulfjack/bazel
that referenced
this pull request
Dec 17, 2019
- Add lcov_merger as an attribute to the py_test rule so that it does not immediately fall over - Add a small section to python_stub_template.txt to perform minimal setup for coverage integration I was able to get this to work manually by using a modified version of coverage.py, see: coveragepy/coveragepy#863 Note that the patch does not work out of the box. It's basically ~impossible to add integration tests until we get a working version of coverage.py, but this is the minimum change required in Bazel to get a basic working version.
bazel-io
pushed a commit
to bazelbuild/bazel
that referenced
this pull request
Jan 23, 2020
- Add lcov_merger as an attribute to the py_test rule so that it does not immediately fall over - Add a small section to python_stub_template.txt to perform minimal setup for coverage integration I was able to get this to work manually by using a modified version of coverage.py, see: coveragepy/coveragepy#863 Note that the patch does not work out of the box. It's basically ~impossible to add integration tests until we get a working version of coverage.py, but this is the minimum change required in Bazel to get a basic working version. Closes #10433. PiperOrigin-RevId: 291166690
|
Fixed by #1289 ? |
Author
|
oh boy! I can't wait to try that out and delete this ugly pile of code. :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is gross as is, it was originally done in a way that minized diffs. :/
This PR is for discussion purposes only. I expect a new PR to be created by anyone interested on master to add lcov support in a non-hacky manner. :)
I'm making the PR on a branch of v4.5.x as our existing changes do not apply cleanly after some of the refactoring in the git master (v5) code.
We are using a patched 4.4.2 internally at the time of PR creation. This patch comes from Google where we've been carrying around some variant of this patch on top of coverage for a very long time. It clearly belongs upstream (starting that here), as the LCOV format seems to be supported by a variety of IDEs and other systems(?).
I don't expect to do future work in this PR itself. Follow #587 for actual details.
Lacking: Any LCOV format unittests. (sadface)
(I did not successfully run the coverage testsuite on this PR but that might have been my lack of trying and possibly a weird environment? They don't seem to run properly for me when following the v4.5.x branch howto.txt instructions but I didn't try to debug why)