Skip to content

Conversation

@mcbarton
Copy link
Collaborator

Description

Please include a summary of changes, motivation and context for this PR.

Fixes # (issue)

Type of change

Please tick all options which are relevant.

  • Bug fix
  • New feature
  • Requires documentation updates

Testing

Please describe the test(s) that you added and ran to verify your changes.

Checklist

  • I have read the contribution guide recently

@mcbarton mcbarton marked this pull request as draft October 21, 2025 10:43
@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.83%. Comparing base (2ec0b9a) to head (184d22a).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #735   +/-   ##
=======================================
  Coverage   79.83%   79.83%           
=======================================
  Files           9        9           
  Lines        3963     3963           
=======================================
  Hits         3164     3164           
  Misses        799      799           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mcbarton mcbarton changed the title [wip] Update coverage bot to Ubuntu 24.04 x86 bot Update coverage bot to Ubuntu 24.04 x86 bot Oct 21, 2025
@mcbarton mcbarton marked this pull request as ready for review October 21, 2025 18:43
lcov --remove coverage.info '${{ github.workspace }}/build/*' --ignore-errors unused --output-file coverage.info
# output coverage data for debugging (optional)
lcov --list coverage.info
rm -rf ./build/
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a bit of a fudge but without it codecov will ignore the coverage report the ci makes, and makes its own (which will include the unittests folder in the coverage report)

@mcbarton mcbarton requested a review from vgvassilev October 21, 2025 19:46
vers="${CC#*-}"
lcov --directory build/ --capture --output-file coverage.info --gcov-tool /usr/bin/gcov-${vers}
lcov --remove coverage.info '/usr/*' "${HOME}"'/.cache/*' ${{ github.workspace }}'/llvm-project/*' ${{ github.workspace }}'/unittests/*' --output-file coverage.info
lcov --directory build/ --capture --output-file coverage.info --gcov-tool /usr/bin/gcov-${vers} --ignore-errors mismatch
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we have --ignore-errors mismatch flag?
The lcov --remove is fine.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Without these changes the ci crashes when you upgrade, since you get a newer lcov version is more restrictive in what it will allow you to get away with. All the changes here were found to be necessary.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Looking at the docs https://manpages.debian.org/unstable/lcov/lcov.1.en.html#mismatch:
I feel we should try and avoid it. Do we have a CI run without that flag?

Copy link
Collaborator Author

@mcbarton mcbarton Oct 23, 2025

Choose a reason for hiding this comment

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

Avoiding this flag would mean dealing with all the mismatch warnings we currently have in the ci now (see https://github.com/compiler-research/CppInterOp/actions/runs/18694188958/job/53307234747?pr=735#step:13:52). If you see all the warnings they are in the test files, and to me dealing with them doesn't feel like it gives any benefit given they aren't effecting the end result, and they can easily be ignored with a flag which lcov itself suggested.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That run still passes. Just gives you a few warnings. I believe that is fine. We should try and fix those warnings instead of ignoring them. Will approve it if you can remove --ignore-errors flag. We can fix the warnings later.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That run passes in the link I gave above because --ignore-errors mismatch is there 😅 . It will error without that flag. We cannot fix them later. If we remove that flag then they would need to be fixed in this PR.

Copy link
Collaborator Author

@mcbarton mcbarton Oct 23, 2025

Choose a reason for hiding this comment

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

Without that flag is treats all those warnings as errors. --ignore-errors mismatch is literally telling lcov to not treat the mismatches as errors, but warnings instead.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm. Ok.

Copy link
Collaborator

@Vipul-Cariappa Vipul-Cariappa left a comment

Choose a reason for hiding this comment

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

I am fine with these changes. But please open an issue tracking the lcov warnings/errors. Before merging this PR. We should try and fix them instead of ignoring.

@mcbarton
Copy link
Collaborator Author

Thanks @Vipul-Cariappa . Opened up the issue here #737 . I will try and tackle this issue soon, so we can remove the flag.

@mcbarton mcbarton merged commit 5f25366 into compiler-research:main Oct 23, 2025
40 checks passed
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