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 code coverage ignore file #279

Merged
merged 8 commits into from
Jul 25, 2022
Merged

Add code coverage ignore file #279

merged 8 commits into from
Jul 25, 2022

Conversation

AzulRadio
Copy link
Contributor

@AzulRadio AzulRadio commented Jul 13, 2022

Signed-off-by: youhy [email protected]

New feature

Part of gz-sim#1575

Summary

Allow users to add coverage.ignore.in each repo to ignore files for the code coverage report.

Test it

coverage.ignore.in looks like this:

profiler/src/Remotery/vis/*
graphics/src/tiny_obj_loader.h

It can only take files. Directories will be ignored.

Then add the following line to CMakeList.txt of the package.

configure_file("${PROJECT_SOURCE_DIR}/coverage.ignore.in"
               ${PROJECT_BINARY_DIR}/coverage.ignore)

Code coverage report sometimes doesn't update with the coverage.ignore if we read from source_dir, so adding this extra step to read it from the binary_dir.

Can be test with
gz-common azulradio/codecoverage_ignore branch

Before:
20220713151601

After:
20220713150911

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@github-actions github-actions bot added Gazebo 1️1️ Dependency of Gazebo classic version 11 🏯 fortress Ignition Fortress 🏰 citadel Ignition Citadel labels Jul 13, 2022
@chapulina chapulina added the QA Quality assurance. label Jul 13, 2022
@chapulina chapulina requested a review from jennuine July 13, 2022 21:36
Copy link
Contributor

@jennuine jennuine left a comment

Choose a reason for hiding this comment

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

This needs to be updated, I tested the gazebosim/gz-physics#388 PR and this file is still appearing in my local coverage report
Peek 2022-07-21 12-43

cmake/IgnCodeCoverage.cmake Outdated Show resolved Hide resolved
AzulRadio and others added 2 commits July 22, 2022 13:21
Signed-off-by: youhy <[email protected]>
Signed-off-by: Jenn Nguyen <[email protected]>
@jennuine
Copy link
Contributor

fb7f098 I added a debug message & removed any potential path prefixes from the html report using --prefix ${PROJECT_SOURCE_DIR}. For example, for gz-utils:

w/o removing prefix
before

w/ removing prefix
after_without_utilsPR


PRs that are ready to test with:

Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

LGTM! Just one final comment

cmake/IgnCodeCoverage.cmake Outdated Show resolved Hide resolved
@chapulina chapulina added the enhancement New feature or request label Jul 23, 2022
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

Yay! Can't wait to see the latest coverage numbers with this in!

@chapulina chapulina merged commit c876ec4 into ign-cmake2 Jul 25, 2022
@chapulina chapulina deleted the azulradio/ignore_file branch July 25, 2022 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏰 citadel Ignition Citadel enhancement New feature or request 🏯 fortress Ignition Fortress Gazebo 1️1️ Dependency of Gazebo classic version 11 QA Quality assurance.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants