mesalock-linux / mesabox

A collection of core system utilities written in Rust for Unix-like systems (and now Windows)
BSD 3-Clause "New" or "Revised" License
137 stars 19 forks source link

[WIP] CI: fix inaccurate test coverage report #31

Closed mssun closed 6 years ago

mssun commented 6 years ago

I believe this will fix the inaccurate test coverage report (in which some line hits are randomly missing).

codecov[bot] commented 6 years ago

Codecov Report

Merging #31 into master will decrease coverage by 5.4%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #31      +/-   ##
==========================================
- Coverage   19.81%   14.41%   -5.41%     
==========================================
  Files          26       26              
  Lines        3305     3877     +572     
  Branches      754     1011     +257     
==========================================
- Hits          655      559      -96     
- Misses       2437     3044     +607     
- Partials      213      274      +61
Impacted Files Coverage Δ
src/posix/chmod/mod.rs 35.52% <0%> (-17.57%) :arrow_down:
src/posix/cat/mod.rs 44.88% <0%> (-10.95%) :arrow_down:
src/gnu/base32/common.rs 61.7% <0%> (-10.43%) :arrow_down:
src/util.rs 45.37% <0%> (-10.18%) :arrow_down:
src/posix/head/mod.rs 53.1% <0%> (-8.68%) :arrow_down:
src/gnu/arch/mod.rs 75% <0%> (-6.82%) :arrow_down:
src/posix/sleep/mod.rs 78.57% <0%> (-4.77%) :arrow_down:
src/error.rs 34.61% <0%> (-4.52%) :arrow_down:
src/sysinit/init/mod.rs 39.72% <0%> (-2.63%) :arrow_down:
src/setup.rs 10.34% <0%> (-0.37%) :arrow_down:
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0a91893...df80726. Read the comment docs.

mssun commented 6 years ago

Don't know why every green line is hitted twice.

mssun commented 6 years ago

The number in the green label represents execute count. Because the CI runs testcases twice, therefore, the execute count is two. This is my guess, don't know why codecov doesn't put the hit counts there.

mssun commented 6 years ago

This is the best result I can do for now. Still some wired coverages in comments, probably because of the inaccuracy of gcov. We can do nothing about it. At least, this is better than before.