hessian2-codec icon indicating copy to clipboard operation
hessian2-codec copied to clipboard

Fix Coverage

Open Lynskylate opened this issue 1 year ago • 4 comments

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 avatar Jul 12 '24 09:07 Lynskylate

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.

codecov-commenter avatar Jul 12 '24 10:07 codecov-commenter

@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?

Lynskylate avatar Jul 12 '24 10:07 Lynskylate

@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

zyfjeff avatar Jul 13 '24 03:07 zyfjeff

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

Lynskylate avatar Jul 15 '24 00:07 Lynskylate