-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Documentation: Document the coverage build a bit more #26367
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
base: master
Are you sure you want to change the base?
Conversation
LucasChollet
left a comment
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.
I haven't found a way to run, say, both TestImageWriter and TestImageDecoder and get a report for both runs combined.
I think ctest is supposed to bring you there, at least from what I remember from another project.
+1 for Lagom test coverage, it would be really to get the results for AK too.
|
|
||
| For lagom builds, you currently have to do the same thing manually: | ||
|
|
||
| 1. Enable `ENABLE_LAGOM_COVERAGE_COLLECTION` in BUild/lagom/CMakeCache.txt |
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.
s/BUild/Build/
| 1. Enable `ENABLE_LAGOM_COVERAGE_COLLECTION` in BUild/lagom/CMakeCache.txt | ||
| 2. Build: `Meta/serenity.sh build lagom TestImageDecoder` | ||
| 3. Run tests: `(cd Tests/LibGfx; ../../Build/lagom/bin/TestImageDecoder)` | ||
| 4. Generate report, requires an LLVM checkout and build: |
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.
Do we need a custom LLVM build? (That's how it sounds here)
Building with coverage already requires clang and I think it usually comes with llvm-tools which contains llvm-profdata and llvm-cov.
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.
You need llvm-profdata and llvm-cov from somewhere, and you need to get prepare-code-coverage-artifact.py from somewhere. I suppose you don't have to have a build. I'll tweak it a bit, thanks.
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions! |
I'm not actually sure if that's the best way to do this. It's based on #23333.
I haven't found a way to run, say, both TestImageWriter and TestImageDecoder and get a report for both runs combined.
There's also a nightly CI bot that's supposedly creating coverage information, but it's been red for years: https://github.com/SerenityOS/serenity/actions/workflows/nightly.yml (We should fix that at some point…)