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

Needs code coverage evaluation #1685

Open
HoOngEe opened this issue Jul 15, 2019 · 4 comments
Open

Needs code coverage evaluation #1685

HoOngEe opened this issue Jul 15, 2019 · 4 comments
Labels

Comments

@HoOngEe
Copy link
Contributor

HoOngEe commented Jul 15, 2019

codechain needs code coverage evaluation before releasing version 2.0
Firstly, we need to investigate the coverage measuring tool.

@HoOngEe
Copy link
Contributor Author

HoOngEe commented Aug 2, 2019

kcov does not help and the repository is too old.

@HoOngEe
Copy link
Contributor Author

HoOngEe commented Aug 2, 2019

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"

@HoOngEe
Copy link
Contributor Author

HoOngEe commented Aug 2, 2019

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
스크린샷, 2019-08-02 18-54-47

@HoOngEe
Copy link
Contributor Author

HoOngEe commented Aug 2, 2019

But still It counts test functions' lines, I need to study more about ignore test functions from counting.

@kseo kseo added the test label Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants