Skip to content

Conversation

@nico
Copy link
Contributor

@nico nico commented Nov 7, 2025


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…)

@github-actions github-actions bot added the 👀 pr-needs-review PR needs review from a maintainer or community member label Nov 7, 2025
Copy link
Member

@LucasChollet LucasChollet left a 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
Copy link
Member

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:
Copy link
Member

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.

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

👀 pr-needs-review PR needs review from a maintainer or community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants