Skip to content

Add coverage test#829

Merged
tpadioleau merged 4 commits intomainfrom
add-coverage-test
Apr 24, 2025
Merged

Add coverage test#829
tpadioleau merged 4 commits intomainfrom
add-coverage-test

Conversation

@tpadioleau
Copy link
Member

No description provided.

@tpadioleau tpadioleau self-assigned this Apr 17, 2025
@tpadioleau tpadioleau force-pushed the add-coverage-test branch 4 times, most recently from 0caf4ee to f0dd13a Compare April 17, 2025 16:45
@codecov
Copy link

codecov bot commented Apr 17, 2025

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@tpadioleau tpadioleau force-pushed the add-coverage-test branch 3 times, most recently from e41c4ad to 84d0d5f Compare April 17, 2025 18:58
@tpadioleau
Copy link
Member Author

@EmilyBourne Any idea how to suppress the tests directory from the report ? https://app.codecov.io/gh/CExA-project/ddc/pull/829/tree

@EmilyBourne
Copy link
Collaborator

EmilyBourne commented Apr 18, 2025

@EmilyBourne Any idea how to suppress the tests directory from the report ? https://app.codecov.io/gh/CExA-project/ddc/pull/829/tree

The gcovr flag --filter should do this. Maybe check your regex?

@tpadioleau
Copy link
Member Author

@EmilyBourne Any idea how to suppress the tests directory from the report ? https://app.codecov.io/gh/CExA-project/ddc/pull/829/tree

The gcovr flag --filter should do this. Maybe check your regex?

That is also what I thought. I feel the paths are not correct due to my usage of the volume mounting with docker

@tpadioleau
Copy link
Member Author

@EmilyBourne It seems that the codecov action was also executing gcov as it could find coverage files in the build. Since I delete the build it seems much better! I guess you did not see this as you called this action from a new job ?

@tpadioleau tpadioleau force-pushed the add-coverage-test branch 3 times, most recently from 6abf27f to c0478c5 Compare April 18, 2025 17:05
@tpadioleau
Copy link
Member Author

@EmilyBourne Also consider --exclude-throw-branches, in my case this revealed that a lot of "potentially throwing" code was not tested. We may not be interested in error handling for now. It gets much greener after adding this option.

@tpadioleau
Copy link
Member Author

tpadioleau commented Apr 18, 2025

Some observations:

  • not tested template code is not counted
  • header files not included are not counted

This makes the coverage higher than expected.

@tpadioleau tpadioleau force-pushed the add-coverage-test branch 4 times, most recently from 839e569 to d69d015 Compare April 22, 2025 19:02
@tpadioleau tpadioleau marked this pull request as ready for review April 22, 2025 19:03
@tpadioleau tpadioleau force-pushed the add-coverage-test branch 3 times, most recently from 38145ee to 9cf0f24 Compare April 23, 2025 06:17
@tpadioleau tpadioleau marked this pull request as draft April 23, 2025 06:18
@tpadioleau
Copy link
Member Author

It seems I need to run gcov from the container to make it work with Ginkgo that is only available from the container. I guess it is also more coherent with regard to the version of gcc used for compiling.

@tpadioleau tpadioleau force-pushed the add-coverage-test branch 4 times, most recently from 5d023f5 to fa9fa1c Compare April 23, 2025 15:12
@tpadioleau tpadioleau marked this pull request as ready for review April 24, 2025 12:27
@tpadioleau tpadioleau merged commit 076c455 into main Apr 24, 2025
20 of 66 checks passed
@tpadioleau tpadioleau deleted the add-coverage-test branch April 24, 2025 16:17
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.

2 participants