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

Fix Coverage #36

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Fix Coverage #36

wants to merge 5 commits into from

Conversation

Lynskylate
Copy link
Collaborator

@Lynskylate Lynskylate commented Jul 12, 2024

fix #33
Our coverage generation relies on the directory external/hessian2-codec/bazel/coverage/collect_cc_coverage.sh where collect_cc_coverage.sh is located. After updating the bazel version, I found the directory external/hessian2-codec/bazel/coverage/collect_cc_coverage.sh not exists, the hessian2-codec self is not in the external directory.

Just a workaround, I directly used the collect_cc_coverage.sh script in the bazel-tool directory.
It appears that Bazel's support for gcov is still experimental in nature; we can address this issue more effectively once its API stabilizes.

@Lynskylate Lynskylate requested a review from zyfjeff July 12, 2024 09:27
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.02%. Comparing base (d5d1202) to head (e012fdf).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #36      +/-   ##
==========================================
+ Coverage   87.03%   88.02%   +0.98%     
==========================================
  Files          25       25              
  Lines        2407     2238     -169     
==========================================
- Hits         2095     1970     -125     
+ Misses        312      268      -44     

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

@Lynskylate
Copy link
Collaborator Author

@zyfjeff It seems we haven't made any special changes to collect_cc_coverage.sh. What impact would using the bazel-tool's collect_cc_coverage have?

@zyfjeff
Copy link
Collaborator

zyfjeff commented Jul 13, 2024

@zyfjeff It seems we haven't made any special changes to collect_cc_coverage.sh. What impact would using the bazel-tool's collect_cc_coverage have?

I can't remember why we should maintain this script separately, but relying directly on Bazel's script instead of our own should be the right direction

@Lynskylate
Copy link
Collaborator Author

I haven't conducted an in-depth test, but it seems that the prof data generated by the version of collect_cc_coverage we forked at present is empty.
You also can change the .bazelrc CC_CODE_COVERAGE_SCRIPT to CC_CODE_COVERAGE_SCRIPT=bazel/coverage/collect_cc_coverage.sh for testing

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.

Fix the issue of coverage CI failure after switching to the bazel module.
3 participants