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 #72

Merged
merged 3 commits into from
Jul 26, 2022
Merged

Conversation

jennuine
Copy link
Contributor

@jennuine jennuine commented Jul 22, 2022

🎉 New feature

Part of gazebosim/gz-sim#1575

Requires: gazebosim/gz-cmake#279

Summary

Adds coverage.ignore.in, which lists files to ignore in the coverage report

Test it

In the root of your colcon workspace:

colcon build --cmake-args -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Coverage --merge-install --packages-select ignition-utils1 --event-handlers console_direct+

# when testing with this PR, you should see a message:
# Ignore coverage additions: '/path/to/ws/src/ign-utils/cli/include/vendored-cli/*'

cd build/ignition-utils1
make test -j8
make coverage VERBOSE=1 -j8

# when testing with PR, you should see the file listed in the command:
# /usr/bin/lcov -q --remove coverage.info '*/test/*' '/usr/*' '*_TEST*' '*.cxx' 'moc_*.cpp' 'qrc_*.cpp' '*.pb.*' '*/build/*' '*/install/*' '/path/to/ws/src/ign-utils/cli/include/vendored-cli/*' --output-file coverage.info.cleaned

firefox coverage/index.html

Before PR
after_without_utilsPR

After PR
after_with_utilsPR

You can try adding other random files / directories and rerunning the above commands again

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.

Signed-off-by: Jenn Nguyen <jenn@openrobotics.org>
@jennuine jennuine requested a review from azeey as a code owner July 22, 2022 21:52
@github-actions github-actions bot added the 🏯 fortress Ignition Fortress label Jul 22, 2022
@codecov
Copy link

codecov bot commented Jul 22, 2022

Codecov Report

Merging #72 (52c8efd) into ign-utils1 (64fea9a) will increase coverage by 50.82%.
The diff coverage is n/a.

❗ Current head 52c8efd differs from pull request most recent head cde0cfb. Consider uploading reports for the commit cde0cfb to get more accurate results

@@               Coverage Diff               @@
##           ign-utils1      #72       +/-   ##
===============================================
+ Coverage       41.14%   91.97%   +50.82%     
===============================================
  Files              17        6       -11     
  Lines            2326      137     -2189     
===============================================
- Hits              957      126      -831     
+ Misses           1369       11     -1358     
Impacted Files Coverage Δ
...lude/vendored-cli/ignition/utils/cli/Formatter.hpp
...ude/vendored-cli/ignition/utils/cli/Validators.hpp
...lude/vendored-cli/ignition/utils/cli/ConfigFwd.hpp
...include/vendored-cli/ignition/utils/cli/Option.hpp
...e/vendored-cli/ignition/utils/cli/FormatterFwd.hpp
...include/vendored-cli/ignition/utils/cli/Config.hpp
.../include/vendored-cli/ignition/utils/cli/Error.hpp
...de/vendored-cli/ignition/utils/cli/StringTools.hpp
...li/include/vendored-cli/ignition/utils/cli/App.hpp
...lude/vendored-cli/ignition/utils/cli/TypeTools.hpp
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 64fea9a...cde0cfb. Read the comment docs.

@jennuine jennuine added the needs upstream release Blocked by a release of an upstream library label Jul 22, 2022
@AzulRadio
Copy link

The ignore list looks good to me.

@chapulina chapulina added QA Quality assurance. bug Something isn't working labels Jul 22, 2022
Signed-off-by: Jenn Nguyen <jenn@openrobotics.org>
@jennuine jennuine mentioned this pull request Jul 25, 2022
5 tasks
Signed-off-by: Jenn Nguyen <jenn@openrobotics.org>
@jennuine jennuine removed the needs upstream release Blocked by a release of an upstream library label Jul 26, 2022
@jennuine jennuine requested a review from chapulina July 26, 2022 17:43
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.

increase coverage by 50.82%.

🚀

@chapulina chapulina merged commit a0aad25 into ign-utils1 Jul 26, 2022
@chapulina chapulina deleted the jennuine/coverage_ignore branch July 26, 2022 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🏯 fortress Ignition Fortress QA Quality assurance.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants