build: have “make test” depend on “make all” #31015

pull theuni wants to merge 1 commits into bitcoin:master from theuni:build-test-depends-all changing 1 files +6 −0
  1. theuni commented at 7:04 pm on October 1, 2024: member

    See Upstream docs for specifics.

    Unfortunately, this seems to have no effect when directly executing ctest :(

    This brings the test -> hack -> test cycle more inline with how it worked with autotools.

    With CMAKE_SKIP_TEST_ALL_DEPENDENCY set to FALSE, make test will trigger a rebuild, ensuring that test binaries are current before running them.

    To test:

    0cmake -S . -B build
    1make -C build -j24
    2touch src/primitives/transaction.cpp
    3make -C build test ARGS=-j24
    

    Without this commit, the above will not rebuild before running tests.

  2. build: have "make test" depend on "make all" 2957ca9611
  3. DrahtBot commented at 7:04 pm on October 1, 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 tdb3
    Concept ACK laanwj, fanquake

    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 Oct 1, 2024
  5. theuni commented at 7:05 pm on October 1, 2024: member
    Ping @hebasto . Also ping @fanquake as I think you’ve complained about this.
  6. hebasto commented at 7:06 pm on October 1, 2024: member
    Does this solution support parallelism in the test phase?
  7. theuni commented at 7:10 pm on October 1, 2024: member
    With ARGS=-jX, yes.
  8. mooncityorg commented at 8:41 pm on October 1, 2024: none
    CMAKE_SKIP_TEST_ALL_DEPENDENCY is false? @bitcoin-core-merge-script
  9. laanwj commented at 9:11 pm on October 1, 2024: member
    Concept ACK
  10. fanquake commented at 10:59 am on October 2, 2024: member
    Concept ACK. Nice that after 15 years there is now a solution (https://cmake.org/Bug/view.php?id=8774, https://gitlab.kitware.com/cmake/cmake/-/issues/8774).
  11. tdb3 approved
  12. tdb3 commented at 12:33 pm on October 3, 2024: contributor

    ACK 2957ca9611916efb570d157b9c7a0b188161660d

    Not sure how many people this would affect in the near term (e.g. I’ve experienced Debian 12 (with apt) and Fedora 40 (with dnf) default to cmake versions under 3.29), but seems like a useful improvement nonetheless.

    Tested with Fedora 40 manually install a more recent cmake version (3.30.4). Saw that make -C build test forces recompile of transaction.cpp.

  13. DrahtBot requested review from fanquake on Oct 3, 2024
  14. DrahtBot requested review from laanwj on Oct 3, 2024
  15. maflcko added the label DrahtBot Guix build requested on Oct 7, 2024
  16. DrahtBot commented at 11:56 pm on October 7, 2024: contributor

    Guix builds (on x86_64) [untrusted test-only build, possibly unsafe, not for production use]

    File commit 62e4516722115c2d5aeb6c197abc73ca7c078b23(master) commit 0b64d6ea527236ce6d30af0aaa30ad2dd1f04423(master and this pull)
    SHA256SUMS.part f2d49fb72517ef0c... f8aef59c77977919...
    *-aarch64-linux-gnu-debug.tar.gz d37cbe26a25f7540... 1030d128b1d0ff3e...
    *-aarch64-linux-gnu.tar.gz 42b4d4db0c531caf... f9be7acff7206d6f...
    *-arm-linux-gnueabihf-debug.tar.gz 63eddcf3cfdb6c32... e00af74f685f3279...
    *-arm-linux-gnueabihf.tar.gz fd2eb3904357b5f4... 027c71c2a1e721c1...
    *-arm64-apple-darwin-unsigned.tar.gz 71a08c8f938313cf... 55871afff8ab5c1d...
    *-arm64-apple-darwin-unsigned.zip ed11994d8f055418... 960ec981f470a691...
    *-arm64-apple-darwin.tar.gz 0c11a002f4f3030c... af3f011f192418d4...
    *-powerpc64-linux-gnu-debug.tar.gz a76483c3abcddcc1... 57b89dec92458570...
    *-powerpc64-linux-gnu.tar.gz 335ec17b370a19d5... 12029e9233fd1d90...
    *-riscv64-linux-gnu-debug.tar.gz 8494e354e088382e... 07756f4fe9c24813...
    *-riscv64-linux-gnu.tar.gz 457df2421685bdda... 3f8378468ace8de7...
    *-x86_64-apple-darwin-unsigned.tar.gz 3cedc5861a78c8a5... 5864f3d1d0fbf3cc...
    *-x86_64-apple-darwin-unsigned.zip 19b332dccbc792b4... 34632e850716fa51...
    *-x86_64-apple-darwin.tar.gz 54c6788eb266f818... ada4be2e79750364...
    *-x86_64-linux-gnu-debug.tar.gz a761c3712ed00392... 7c58144150d10237...
    *-x86_64-linux-gnu.tar.gz fceda20d8f50b5ab... 0652537296c02734...
    *.tar.gz 38978a4be1a7c7eb... 6a08ba043ab6f3d7...
    guix_build.log b4092f80775416ae... bad5bed29f65f39e...
    guix_build.log.diff 4159e55b5b132f7c...
  17. DrahtBot removed the label DrahtBot Guix build requested on Oct 7, 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-10-08 16:12 UTC

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