Skip to content

build: add test-coverage script #10894

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ryzhak
Copy link
Contributor

@ryzhak ryzhak commented Jul 1, 2025

This PR adds a new test-coverage script to makefile which runs unit/doc tests and generates an html report locally in the target/llvm-cov/html folder.

This way it's easier to see parts of code which could be better covered with tests.

Notice that the displayed line coverage right now is 62.28% but that's not an accurate value because llvm-cov counts all unit tests in mod tests modules as uncovered code. Those unit tests should be manually excluded from the coverage report (which could be a part of another issue if collecting test coverage lies within the project vision):

#[cfg(test)]
#[cfg_attr(coverage_nightly, coverage(off))]
mod tests {
    // ...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant