Skip to content

ci: use an absolute LLVM_PROFILE_FILE path so coverage includes the sed binary - #591

Open
DePasqualeOrg wants to merge 1 commit into
uutils:mainfrom
DePasqualeOrg:ci-absolute-profile-path
Open

DePasqualeOrg wants to merge 1 commit into
uutils:mainfrom
DePasqualeOrg:ci-absolute-profile-path

Conversation

@DePasqualeOrg

@DePasqualeOrg DePasqualeOrg commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

The integration tests run the sed binary through uutests, which starts each command in a temporary directory that is deleted when the test ends. Because LLVM_PROFILE_FILE is a relative path, every run of the binary writes its .profraw file into that directory, and its coverage is lost. Only the unit tests, which run in the workspace, are counted.

As a result, Codecov reports src/sed/processor.rs at about 28%. Code that many tests run, such as the q, Q and = commands and the automatic printing of the pattern space, is shown as never executed, and codecov/patch fails on most changes to command behavior.

This PR anchors the path to the workspace, so the files survive the test and grcov finds them. uutils/grep#5 made the same change, which raised its reported coverage from 0% to about 96%.

@codecov

codecov Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.82%. Comparing base (1113479) to head (3f802af).

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #591       +/-   ##
===========================================
+ Coverage   83.86%   94.82%   +10.95%     
===========================================
  Files          14       14               
  Lines        7203     7203               
  Branches      424      424               
===========================================
+ Hits         6041     6830      +789     
+ Misses       1157      372      -785     
+ Partials        5        1        -4     
Flag Coverage Δ
macos_latest 96.36% <ø> (+11.38%) ⬆️
ubuntu_latest 96.30% <ø> (+11.12%) ⬆️
windows_latest 0.00% <ø> (ø)

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant