How to generate Test Coverage #198

issue Eunovo openend this issue on August 28, 2025
  1. Eunovo commented at 9:42 am on August 28, 2025: contributor

    I wanted to see where testing could be improved, so I thought it would be a good idea to see the test coverage for the project. I tried my hand at setting up test coverage in https://github.com/Eunovo/libmultiprocess/tree/make-test-coverage

    The process to generate the test coverage is:

    0cmake -B build -DCMAKE_BUILD_TYPE=Coverage
    1cd build
    2make tests
    3cmake -DLCOV_OPTS="--ignore-errors mismatch"  -P Coverage.cmake
    

    The .gcno files are generated, but the .gcda files are not generated, so the process fails to complete. I’m not sure why the gcda files are not being generated. I can see gcov symbols when I do nm ./test/mptest | grep gcov, but it doesn’t work.

  2. maflcko commented at 9:48 am on August 28, 2025: contributor
    I haven’t tried this, but you may be more successful with the llvm/clang coverage, similar to how it is documented for Bitcoin Core: https://github.com/bitcoin/bitcoin/blob/6ca6f3b37b992591726bd13b494369bee3bd6468/doc/developer-notes.md#using-llvmclang-toolchain ?
  3. ryanofsky referenced this in commit 58cf47a7fc on Oct 2, 2025


Eunovo maflcko


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/libmultiprocess. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-12-04 19:30 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me