Skip to content
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

Add support for not covered mutants #831

Merged
merged 1 commit into from
Jan 16, 2021
Merged

Conversation

AlexDenisov
Copy link
Member

By default Mull generates mutations for every function possible. There is an option (-coverage-info) to use the coverage information obtained from Clang (see the docs for more details) to not mutate unreachable code.

Without coverage information, Mull wastes CPU time by checking mutants that cannot be killed. With the coverage information Mull gives misleading reports saying that the mutation coverage is 100% even if only 10% of code was mutated.

This patch adds an option (-include-not-covered) to also include not covered mutants in the report even when code coverage is provided. The not-covered mutants will show up in the reports, but Mull won't actually mutate anything and won't run tests against not covered mutants.

This patch partially addresses #636.

P.S. This is up for review, but I'll do more testing soon as I may have missed some edge cases.

@AlexDenisov AlexDenisov linked an issue Jan 9, 2021 that may be closed by this pull request
@@ -44,6 +44,8 @@

--coverage-info string Path to the coverage info file (LLVM's profdata)

--include-not-covered Include (but do not run) not covered mutants. Disabled by default
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should this not say "non-covered" mutants? "not covered" sounds a little strange in plural.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it makes sense. There are some contexts (like "Include (but do not run) not covered mutants." above) where "not" is more appropriate, imo. So I think it's better to stick to one form to avoid any confusion.

@AlexDenisov AlexDenisov merged commit cee2591 into master Jan 16, 2021
@AlexDenisov AlexDenisov deleted the not-covered-mutants branch January 16, 2021 13:16
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.

Feature request: mull line coverage
3 participants