Skip to content

Conversation

scpeters
Copy link
Member

@scpeters scpeters commented Apr 28, 2025

🦟 Bug fix

Fixes some errors related to code coverage on 24.04

Summary

Running make coverage currently fails on 24.04 due to lcov errors and warnings. This is difficult to see because these warnings are currently redirected to /dev/null. Through debugging in gazebosim/gz-utils#174, testing with nightly builds of gz-cmake5, and viewing GitHub workflow console logs (for example), several types of errors were identified that could be ignored to allow make coverage to pass for gz-utils.

There are other issues with code coverage, specifically with uploading coverage reports (similar to MicrosoftPremier/VstsExtensions#237). I will open a separate issue about this referencing codecov/feedback#301 and https://docs.codecov.com/docs/codecov-uploader.

Checklist

  • Signed all commits for DCO
  • Added tests
  • 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.

`make coverage` currently fails on 24.04
due to lcov errors and warnings. This allows
lcov errors and warnings to be printed and
ignores many of them.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
COMMAND ${LCOV_PATH} ${_branch_flags} -q --no-checksum
--directory ${PROJECT_BINARY_DIR} --capture
--output-file ${_outputname}.info 2>/dev/null
--ignore-errors gcov,gcov
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it make sense instead of ignoring categories doing it per files / per directories, something like:

 --exclude '/usr/include/*' \
 --exclude '*_TEST.cc' \

Copy link
Member Author

Choose a reason for hiding this comment

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

we use --remove with lots of path wildcards on line 152. I'm not sure what the best approach is here. I think we would need to test with more packages as well so see if more --ignore-errors categories are needed

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

Labels

None yet

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

2 participants