Skip to content

github-actions: fix codecov for unittests #12181

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

Closed
wants to merge 3 commits into from

Conversation

victorjulien
Copy link
Member

Don't overwrite ut coverage with later tests.

Don't overwrite ut coverage with later tests.
Copy link

codecov bot commented Nov 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.18%. Comparing base (bd7d38e) to head (971326d).
Report is 25 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #12181       +/-   ##
===========================================
+ Coverage   49.81%   83.18%   +33.37%     
===========================================
  Files         909      912        +3     
  Lines      257904   257055      -849     
===========================================
+ Hits       128467   213832    +85365     
+ Misses     129437    43223    -86214     
Flag Coverage Δ
fuzzcorpus 60.98% <ø> (+0.03%) ⬆️
livemode 19.56% <ø> (+0.13%) ⬆️
pcap 44.46% <ø> (+0.05%) ⬆️
suricata-verify 62.72% <ø> (-0.03%) ⬇️
unittests 59.17% <ø> (+50.19%) ⬆️

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

Run various commandlines, checking that they don't error/crash.

Also counts towards coverage.
Flags are:
- unittests
- suricata-verify
- pcap
- livemode
- fuzzcorpus

This should make sure codecov only adds its report after receiving
the results for each of the flags.
@victorjulien victorjulien marked this pull request as ready for review November 29, 2024 11:28
Comment on lines +1532 to +1535
- run: llvm-profdata-14 merge -o dumpfeatures.profdata /tmp/dumpfeatures.profraw
- run: ./src/suricata --dump-config -c suricata.yaml -l /tmp
env:
LLVM_PROFILE_FILE: "/tmp/dumpconfig.profraw"
Copy link
Member

Choose a reason for hiding this comment

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

It matches the existing pattern, but how does the dumpfeatures profile data end up being uploaded to codecov?

Copy link
Member Author

Choose a reason for hiding this comment

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

IIRC it scans for profdata files

Copy link
Member

Choose a reason for hiding this comment

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

All I see it doing is uploaded the coverage.txt file, which I never see this one merged into. Anyways, not really a thing with this PR.

@victorjulien victorjulien added this to the 8.0 milestone Nov 29, 2024
@victorjulien
Copy link
Member Author

Merged in #12185, thanks!

@victorjulien victorjulien deleted the ci-codecov/1 branch January 15, 2025 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants