hessian2-codec
hessian2-codec copied to clipboard
Fix Coverage
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.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
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
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@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 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
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