build: Fix / improve coverage scripts #30772

pull hebasto wants to merge 3 commits into bitcoin:master from hebasto:280830-coverage changing 4 files +29 −3
  1. hebasto commented at 3:01 pm on August 30, 2024: member

    The first commit ensures early error catching.

    The second commit adds the -g flag that was missed during the migration from Autotools.

    This PR is intended to be tested with GCC compiler (as clang support is still under scrutiny). Depending on the lcov version, additional flags -DCMAKE_C_FLAGS="-fprofile-update=atomic" -DCMAKE_CXX_FLAGS="-fprofile-update=atomic" may be required.

  2. hebasto added the label Build system on Aug 30, 2024
  3. DrahtBot commented at 3:01 pm on August 30, 2024: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK maflcko, tdb3

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    No conflicts as of last run.

  4. tdb3 approved
  5. tdb3 commented at 6:35 pm on August 31, 2024: contributor

    ACK 6e5254cf687578ebb686628cf89f2509d415f04f

    Light CR and test.

    0cmake -B build -DENABLE_WALLET=OFF -DCMAKE_BUILD_TYPE=Coverage
    1cmake --build build -j18
    2cmake -P build/Coverage.cmake
    

    Induced failure (and received error as expected) with:

    0 execute_process(
    1+  COMMAND rm test_bitcoin.info
    2   COMMAND ${LCOV_FILTER_COMMAND} test_bitcoin.info test_bitcoin_filtered.info
    3   WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
    4   COMMAND_ERROR_IS_FATAL ANY
    
  6. DrahtBot added the label CI failed on Sep 3, 2024
  7. maflcko commented at 3:13 pm on September 3, 2024: member
    review ACK 6e5254cf687578ebb686628cf89f2509d415f04f
  8. in cmake/script/CoverageFuzz.cmake:21 in 6e5254cf68 outdated
    15@@ -16,27 +16,33 @@ execute_process(
    16 execute_process(
    


    maflcko commented at 3:17 pm on September 3, 2024:
    unrelated: Why not set the parallel tasks, like in the script above?

    hebasto commented at 3:55 am on September 4, 2024:
    You mean for the lcov command?

    maflcko commented at 5:18 am on September 4, 2024:
    I mean in the test_runner command

    hebasto commented at 5:30 am on September 4, 2024:
    Thanks! Added.
  9. DrahtBot removed the label CI failed on Sep 4, 2024
  10. DrahtBot added the label Needs rebase on Sep 4, 2024
  11. build: Add `COMMAND_ERROR_IS_FATAL` to every process in coverage scrips fe2003ab12
  12. build: Add missed `-g` for "Coverage" build configuration e7cf4a6f27
  13. build: Add `JOBS` variable support to `CoverageFuzz.cmake` script d9fcbfc372
  14. hebasto force-pushed on Sep 4, 2024
  15. hebasto commented at 3:04 pm on September 4, 2024: member
    Rebased to resolve a conflict with the merged #30804.
  16. maflcko commented at 3:18 pm on September 4, 2024: member
    review ACK d9fcbfc3727e06e6f57d4ab09861f3212d558426
  17. DrahtBot requested review from tdb3 on Sep 4, 2024
  18. tdb3 approved
  19. tdb3 commented at 4:05 pm on September 4, 2024: contributor
    cr re ACK d9fcbfc3727e06e6f57d4ab09861f3212d558426
  20. DrahtBot removed the label Needs rebase on Sep 4, 2024
  21. DrahtBot added the label CI failed on Sep 4, 2024
  22. fanquake merged this on Sep 5, 2024
  23. fanquake closed this on Sep 5, 2024

  24. hebasto deleted the branch on Sep 5, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-09-28 22:12 UTC

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