cmake, guix: Skip building tests in subtrees for releases #32054

pull hebasto wants to merge 2 commits into bitcoin:master from hebasto:250313-test-binary changing 4 files +12 −10
  1. hebasto commented at 9:21 am on March 13, 2025: member

    The BUILD_TESTS variable has a broad scope, controlling:

    • Building test_bitcoin
    • Building test_bitcoin-qt
    • Building tests in subtrees, such as secp256k1 and univalue
    • Creating CTest’s tests

    However, for release builds, only the first is necessary.

    To address this, this PR introduces the new BUILD_TEST_BINARY variable, which allows building only the test_bitcoin binary without enabling other tests.


    As an alternative, an explicit list of build targets can be specified in the contrib/guix/libexec/build.sh.

  2. cmake: Introduce `BUILD_TEST_BINARY` variable
    The `BUILD_TESTS` variable has a broad scope, controlling:
    - Building `test_bitcoin`
    - Building `test_bitcoin-qt`
    - Building tests in subtrees, such as `secp256k1` and `univalue`
    - Creating CTest's tests
    
    However, for release builds, only the first is necessary.
    
    To address this, the new `BUILD_TEST_BINARY` variable allows building
    only the `test_bitcoin` binary without enabling other tests.
    ebfa1192ba
  3. guix: Skip building tests in subtrees 72211802e5
  4. hebasto added the label Build system on Mar 13, 2025
  5. DrahtBot commented at 9:21 am on March 13, 2025: contributor

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

    Code Coverage & Benchmarks

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

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Concept NACK fanquake

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

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #31802 (Add bitcoin-{node,gui} to release binaries for IPC by Sjors)
    • #31741 (multiprocess: Add libmultiprocess git subtree by ryanofsky)
    • #30975 (ci: build multiprocess on most jobs by Sjors)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  6. hebasto renamed this:
    cmake, guix: Skip building tests in subtrees
    cmake, guix: Skip building tests in subtrees for releases
    on Mar 13, 2025
  7. fanquake commented at 9:36 am on March 13, 2025: member
    Concept NACK on introducing build options to control building single binaries.
  8. hebasto commented at 9:40 am on March 13, 2025: member

    Concept NACK on introducing build options to control building single binaries.

    Every other BUILD_* variable does exactly the same.

  9. hebasto commented at 9:45 am on March 13, 2025: member
    Alternatively, an explicit list of targets could be specified here:https://github.com/bitcoin/bitcoin/blob/c20a5ce106be716a503bcf615a1900ba8c635430/contrib/guix/libexec/build.sh#L247-L248
  10. fanquake commented at 9:45 am on March 13, 2025: member
    Sure, but I think that isn’t a great pattern, and this makes it worse. Having a BUILD_TESTS & BUILD_TEST_BINARY is awkward, and I think the motivation is poor; if you only want to build certain binaries in a Guix build, then use --target. Why does it need a new build option?

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: 2025-03-28 15:12 UTC

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