cmake: Copy `cov_tool_wrapper.sh.in` to the build tree #31722

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:250123-cmake-cov changing 3 files +2 −1
  1. hebasto commented at 10:51 AM on January 23, 2025: member

    This PR ensures that cov_tool_wrapper.sh.in is available when invoking the Coverage.cmake script from any directory.

    Here is an example of usage on Ubuntu 24.10 with the default GCC 14.2.0:

    $ cmake -B build -DCMAKE_BUILD_TYPE=Coverage -DCMAKE_CXX_FLAGS="-fprofile-update=atomic" -DCMAKE_C_FLAGS="-fprofile-update=atomic"
    $ cmake --build build -j $(nproc)
    $ cd ..
    $ cmake -DJOBS=$(nproc) -DLCOV_OPTS="--ignore-errors inconsistent,inconsistent" -P bitcoin/build/Coverage.cmake
    

    Fixes #31638.

  2. cmake: Copy `cov_tool_wrapper.sh.in` to the build tree
    This change ensures that `cov_tool_wrapper.sh.in` is available when
    invoking the `Coverage.cmake` script from any directory.
    e3c0152769
  3. DrahtBot commented at 10:51 AM on January 23, 2025: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31722.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK theuni

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

  4. DrahtBot added the label Build system on Jan 23, 2025
  5. hebasto added this to the milestone 29.0 on Jan 23, 2025
  6. jimhashhq approved
  7. jimhashhq commented at 9:46 PM on January 23, 2025: none

    Looks very good to me. Thank you for the fix, and for pointing out & correcting the relative path issue.

  8. hebasto added the label Bug on Feb 3, 2025
  9. in cmake/script/CoverageInclude.cmake.in:15 in e3c0152769
      11 | @@ -12,7 +12,7 @@ endif()
      12 |  
      13 |  # COV_TOOL is used to replace a placeholder.
      14 |  configure_file(
      15 | -  cmake/cov_tool_wrapper.sh.in ${CMAKE_CURRENT_LIST_DIR}/cov_tool_wrapper.sh
      16 | +  ${CMAKE_CURRENT_LIST_DIR}/cov_tool_wrapper.sh.in ${CMAKE_CURRENT_LIST_DIR}/cov_tool_wrapper.sh
    


    theuni commented at 7:02 PM on February 7, 2025:

    Could this not be relative to ${PROJECT_SOURCE_DIR} instead to avoid the two-step copy/process?


    hebasto commented at 9:47 AM on February 8, 2025:

    With the current design, the required gcov or llvm-cov tools are searched during the Coverage{Fuzz}.cmake script invocation. This two-step processing could potentially be avoided by moving these tool checks into the main buildsystem script. However, there is no reliable way to gate them depending on whether the build configuration is 'Coverage' or not.

  10. theuni approved
  11. theuni commented at 5:42 PM on February 12, 2025: member

    utACK e3c015276962192355e16ca91391b8bc8e188291

  12. fanquake merged this on Feb 13, 2025
  13. fanquake closed this on Feb 13, 2025

  14. hebasto deleted the branch on Feb 13, 2025
  15. sedited referenced this in commit f78a01a560 on Feb 22, 2025
  16. stickies-v referenced this in commit d760fd3dda on Mar 17, 2025
  17. stickies-v referenced this in commit cc83553352 on Mar 17, 2025
  18. stickies-v referenced this in commit 2614933f06 on Mar 17, 2025
  19. stickies-v referenced this in commit b70418c5fc on Mar 17, 2025
  20. stickies-v referenced this in commit 69f8a1fe50 on Mar 17, 2025
  21. bug-castercv502 referenced this in commit d15545ffaa on Sep 28, 2025
  22. tomt1664 referenced this in commit 245617c480 on Apr 15, 2026
  23. Kino1994 referenced this in commit c19d40c299 on Jun 28, 2026
  24. BigcoinBGC referenced this in commit af1f438298 on Jun 30, 2026
  25. bitcoin locked this on Jul 30, 2026

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: 2026-08-14 16:52 UTC

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