Skip to content

Needs code coverage evaluation #1685

Open

Description

@seonpyoKim

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

Activity

  1. seonpyoKim commented on Aug 2, 2019

    @seonpyoKim
    ContributorAuthor

    kcov does not help and the repository is too old.

  2. seonpyoKim commented on Aug 2, 2019

    @seonpyoKim
    ContributorAuthor

    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"
    
  3. seonpyoKim commented on Aug 2, 2019

    @seonpyoKim
    ContributorAuthor

    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

  4. seonpyoKim commented on Aug 2, 2019

    @seonpyoKim
    ContributorAuthor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions