gh-151001: fix coverage-lcov target for lcov v2.x#151008
Conversation
| --directory $(abs_builddir) \ | ||
| --base-directory $(realpath $(abs_builddir)) \ | ||
| --path $(realpath $(abs_srcdir)) \ | ||
| --ignore-errors negative \ |
There was a problem hiding this comment.
geninfo: ERROR: Unexpected negative count '-1' for branch 1 of /mnt/d/cpython/cpython/Modules/getpath.c:944.
Perhaps you need to compile with '-fprofile-update=atomic
(use "geninfo --ignore-errors negative ..." to bypass this error)
make: *** [Makefile:1070: coverage-lcov] Error 1
i added after getting error ..
There was a problem hiding this comment.
hmm, but it looks off, as in diff it looks like --ignore-errors negative \ is added as replacement, should add this below one line, Do you have any suggestion for me ? thanks
There was a problem hiding this comment.
I think you must leave comments (at least in this PR) on each added --ignore-errors.
| @lcov $(COVERAGE_LCOV_OPTIONS) --capture \ | ||
| --directory $(abs_builddir) \ | ||
| --base-directory $(realpath $(abs_builddir)) \ | ||
| --path $(realpath $(abs_srcdir)) \ |
There was a problem hiding this comment.
Why this argument was needed before?
There was a problem hiding this comment.
--path was added in 2013 (commit 49e52f9) with --base-directory, but the commit message doesn't explain its specific purpose but further it was changed, and now means "Strip PATH from tracefile when applying diff"
(.venv) aniket@DESKTOP-074O80J:/mnt/d/cpython/cpython$ lcov --help | grep path
-b, --base-directory DIR Use DIR as base directory for relative paths
--path PATH Strip PATH from tracefile when applying diff
--list-full-path Print full path during a list operation
This comment was marked as resolved.
This comment was marked as resolved.
skirpichev
left a comment
There was a problem hiding this comment.
Looks good for me, but lets wait a review from some expert. Not sure who can do this. CC @ezio-melotti per experts index (testing).
BTW, if this will be merged, lets not forget to update https://devguide.python.org/testing/coverage/. I don't think that both v1 and v2 branches of the lcov can be supported.
| --directory $(abs_builddir) \ | ||
| --base-directory $(realpath $(abs_builddir)) \ | ||
| --path $(realpath $(abs_srcdir)) \ | ||
| --ignore-errors negative \ |
There was a problem hiding this comment.
I think you must leave comments (at least in this PR) on each added --ignore-errors.
thanks for the review, i'll wait sometime for review and then update with the comments for
sure 👍 |
fixes #151001