-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
travis: add c code coverage measurements #14311
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
Conversation
I am facing a couple of surprising behaviors here:
I will investigate them but if anybody comes with a solution he is welcome. |
@MatthieuDartiailh and myself recently met at https://githubsatellite.com/ (thanks github for inviting us), and he suggested that he could take advantage of his expertise in setting up C coverage for kiwisolver to add that feature to matplotlib too, which I was quite enthusiastic about. This may also be useful if at some point mplcairo does move to core matplotlib, as mplcairo is nearly fully C++. |
Hopefully this will avoid cross-talks with other installs
I fixed the obvious building issue, but I am still confused by how python coverage is collected (or rather not). On this branch I get coverage warning at the end of running pytest but before the slowest tests and short summary (https://travis-ci.org/matplotlib/matplotlib/jobs/538973201#L2545). On master the same warning is issued by later (https://travis-ci.org/matplotlib/matplotlib/jobs/538952156#L2590). |
I think the warning is a spurious one, basically pytest-dev/pytest-cov#129. |
Thanks for the explanation @anntzer. It looks like you see the same fluctuation of coverage over the python files in #14373 so I guess it is somehow unrelated to my changes. C/C++ coverage measurement can handle multiprocess (if the compiler is recent enough). So I think this is good to go from my point of view. |
Indeed, we've always seen these tiny coverage changes and they've always been a mystery to us. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
PR Summary
Add c-code coverage measurement when testing under linux on Travis. Coverage uses lcov which allows to specify lines that should be ignored, contrary to gcov.
I will monitor the build and the coverage report to make sure they make sense before requesting a review.