Skip to content

Conversation

@jschwe
Copy link
Member

@jschwe jschwe commented Oct 16, 2025

Also add a ./mach coverage-report command to use cargo llvm-cov to generate a coverage report from the raw profiles.
The workflow is:

./mach build --coverage [--profile <cargo_profile]
# Or test-wpt or test-devtools
./mach run --coverage [--profile <cargo_profile]
./mach coverage-report [optional parameters for cargo-llvm-cov]

Note that ./mach test-wpt --coverage will require lots of diskspace (multiple 100s of GBs) at the moment. Also note that ./mach test-devtools --coverage will not produce any coverage profiles yet, since the test runner kills the servo binary, which prevents writing the profile data at shutdown.

Testing: Describe how this pull request is tested or why it doesn't require tests
Fixes: Link to an issue this pull requests fixes or remove this line if there is no issue

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This command can be used to generate a coverage report after running an
instrumented servo binary.
Cleaning up is currently left to the user.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant