Open HoOngEe opened 5 years ago
tarpaulin is much better.
Even though the cargo test --all
passes successfully, tarpaulin gives error like
test consensus::validator_set::dynamic_validator::tests::validator_set ... Error: "Failed to get test coverage! Error: Failed to run tests: A segfault occurred while executing tests"
grcov finally works with
RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads" cargo +nightly test --all;
zip -0 ccov.zip `find . \( -name "codechain*.gc*" \) -print`;
grcov ccov.zip -s . -t lcov --llvm --branch --ignore-not-existing --ignore-dir "/*" -o lcov.info;
It reported
But still It counts test functions' lines, I need to study more about ignore test functions from counting.
codechain needs code coverage evaluation before releasing version 2.0 Firstly, we need to investigate the coverage measuring tool.