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

Exclude executables from coverage #5042

Merged
merged 3 commits into from
Jan 10, 2025
Merged

Exclude executables from coverage #5042

merged 3 commits into from
Jan 10, 2025

Conversation

chrstnbwnkl
Copy link
Member

Issue

fastcov uses substring matching to exclude files, so passing src/valhalla_ and src/mjolnir/valhalla_ should do the trick. Tested locally and worked as expected.

@kevinkreiser
Copy link
Member

and yet coverage is reduced somehow?

@chrstnbwnkl
Copy link
Member Author

What hahah how? Zu früh gefreut

@kevinkreiser
Copy link
Member

scheint so ja.. when i look at the report it still says there are tracked lines in those files: https://app.codecov.io/gh/valhalla/valhalla/tree/cb-coverage/src so maybe we just have the flag to do the exclusions wrong? i saw you put multiple on the same argument maybe you have to specify the flag multiple times, once for each exclude?

CMakeLists.txt Outdated
@@ -360,7 +360,7 @@ if(ENABLE_COVERAGE)

set(FASTCOV_PATH ${VALHALLA_SOURCE_DIR}/third_party/fastcov/fastcov.py)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/coverage.info
COMMAND ${FASTCOV_PATH} -d . --exclude /usr/ third_party/ ${CMAKE_CURRENT_BINARY_DIR}/ --lcov -o coverage.info
COMMAND ${FASTCOV_PATH} -d . --exclude /usr/ third_party/ src/valhalla_ src/mjolnir/valhalla_ ${CMAKE_CURRENT_BINARY_DIR}/ --lcov -o coverage.info
Copy link
Member

Choose a reason for hiding this comment

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

maybe for things that arent directories you need wildcards or something..

@kevinkreiser kevinkreiser merged commit 5333ccb into master Jan 10, 2025
8 of 9 checks passed
@kevinkreiser kevinkreiser deleted the cb-coverage branch January 10, 2025 03:32
@kevinkreiser
Copy link
Member

i noticed the coverage still doesnt quite agree so there is still more to update here

ianthetechie pushed a commit to ianthetechie/valhalla that referenced this pull request Feb 7, 2025
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