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

Use the instrumentation-based code coverage implementation #70

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

oSoMoN
Copy link
Collaborator

@oSoMoN oSoMoN commented Apr 30, 2024

This requires more work to figure out why the generated reports are unusable.

EDIT: fixed

@oSoMoN oSoMoN marked this pull request as draft April 30, 2024 22:11
@oSoMoN oSoMoN force-pushed the grcov-instrumentation-based-coverage branch from d2ae264 to 02aee3d Compare August 10, 2024 10:50
Copy link

codecov bot commented Aug 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.12%. Comparing base (b815162) to head (dbabf39).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #70      +/-   ##
==========================================
- Coverage   82.01%   81.12%   -0.89%     
==========================================
  Files          10       10              
  Lines        3013     4227    +1214     
  Branches      753      403     -350     
==========================================
+ Hits         2471     3429     +958     
- Misses        513      778     +265     
+ Partials       29       20       -9     
Flag Coverage Δ
macos_latest 81.23% <ø> (-1.63%) ⬇️
ubuntu_latest 81.42% <ø> (+5.69%) ⬆️
windows_latest 20.41% <ø> (+4.52%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@oSoMoN oSoMoN force-pushed the grcov-instrumentation-based-coverage branch from 02aee3d to 3d8ba75 Compare August 10, 2024 11:14
@oSoMoN
Copy link
Collaborator Author

oSoMoN commented Aug 10, 2024

Generated reports are now correct and usable on unix and macos, but running cargo test with -Cinstrument-coverage on windows now fail:

process didn't exit successfully: `D:\a\diffutils\diffutils\target\debug\deps\diffutilslib-a04822fa61f6982e.exe` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)

This requires further investigation, but the results on unix/macos are already quite promising.

@oSoMoN
Copy link
Collaborator Author

oSoMoN commented Aug 15, 2024

Removing -Clink-dead-code from $RUSTFLAGS results in the tests passing on Windows.

This looks very similar to rust-lang/rust#76038. An old comment on that issue claims that:

-Clink-dead-code is no longer required or recommended when enabling coverage instrumentation

So let's just go with it!

@oSoMoN oSoMoN marked this pull request as ready for review August 15, 2024 22:31
@oSoMoN oSoMoN changed the title [WIP] Use the instrumentation-based code coverage implementation Use the instrumentation-based code coverage implementation Aug 15, 2024
@oSoMoN oSoMoN force-pushed the grcov-instrumentation-based-coverage branch from 3ca9ca6 to dbabf39 Compare August 15, 2024 22:36
@sylvestre sylvestre merged commit 6ec8370 into uutils:main Sep 6, 2024
24 of 25 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