GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||
GeezerVison is showing github.com — gh-94759: Collect C-level coverage using llvm-cov by mdboom · Pull Request #94760 · python/cpython Conversation
|
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Does every run clobber the previous run's report? What about CI runs on PRs and CI runs from release branches? Can this be configured to commit the coverage results into a branch in the repo matching the reponame+branchname? Or do branches not render in gh-pages? in which case it'd need to be subdirectories in the repo.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Currently, this clobbers the previous run. That is easily changed with a flag, but then we could run into Github repository size limits (each result is around 100MB of HTML). It's probably possible to keep the last N commits, but the tool I'm using to publish doesn't support that directly.
This is currently configured to just run on the main branch once a day. We could do multiple branches that publish to subdirectories if you think there's a good use case for that. (Github pages only publishes a single branch, but subdirectories would work).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
If we would get some funding to run a persistent VM with public hostname from ... let's say Azure, then it would be trivial to create a buildbot worker and serve the LCOV results from HTTP server. They are static HTTP and JS files on the file system after all. Just saying :)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I don't mind main branch only and once a day. Anyone working on coverage is presumably doing their own local coverage runs while creating PRs.
Regarding a buildbot configured to host the results, while I could simply set one up it'd probably make more sense for mdboom to do that and be an admin given who's driving this work. :)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'd be happy to admin that if it comes to it. I think it's fine to go with the Github Action here as an MVP, and if the amount of history or frequency of runs isn't good enough, we can revisit migrating to our own VM down the road.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
What is the benefit to run the suit daily? If the report is used as a guide for additions into the tests, a weekly run seems to be enough. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
If it's daily then it's up-to-date more than the weekly. More up-to-date is better than less up-to-date 😉. There's also the benefit that people will have a better idea of what to work on in terms of coverage than not as someone may put in a lot of work for something that's already been fixed earlier in the week. Not to say that a weekly coverage run isn't good as well, but daily is just better if we can make it happen. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Is there any particular reasons why you are using clang and custom instructions for LCOV instead of |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Which one produces more useful output? (I really don't care which we use even though everything I do at work is clang/llvm based - I just want line and branch coverage data) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@tiran the idea of using clang comes from faster-cpython/ideas#426 where I believe branch coverage was considered the big win. Maybe |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GCC and LCOV can do branch coverge, too. I'll have a branch ready by tomorrow. I would welcome to have LLVM coverage support in Makefile, too. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
It was an attempt to get branch coverage, not realizing lcov could do it. I still think llvm-cov displays branches within subexpressions in a more readable way, however. I don't know if using gcov for collection + llvm-cov for output would give us the best of both worlds. (Using gcc for the collection would be preferable, probably, since that's what we test with on Linux). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
It doesn't look like this is possible. There is an @brettcannon wrote:
@tiran wrote:
I think that's a good idea, but a fair chunk of fiddly work. The Makefile doesn't have any direct support for building with clang on Linux. It works if you set |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Can you have the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I just refactored this so there is a new Makefile target
I hadn't thought of this -- it's probably doable. Given that you have to completely reconfigure to switch between each "mode" that probably makes sense. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I've updated this to automatically choose lcov or llvm-cov depending on the compiler in use. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
eb15335 to
58e38af
Compare
There was an error while loading. Please reload this page.
6ba9b68 to
0001577
Compare
9863146 to
87df0f2
Compare
08812bc to
c9b23a1
Compare
|
@erlend-aasland wrote:
I tried this and unfortunately it created a bunch of co-authored commits for everything that had happened in the meantime and then requested review from ~20 codeowners. I went back to rebasing/force pushing for a cleaner review of the actually relevant commits. Going to read the relevant parts of the devguide for next time... |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Christian Heimes <[email protected]>
c9b23a1 to
ceb32ee
Compare
|
Are there any additional comments on this? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There's a process for this now. Adding LLVM support to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.