test: Treat executable paths in tests consistently #32324

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:250422-util-test changing 2 files +3 −1
  1. hebasto commented at 10:49 am on April 22, 2025: member

    When using multi-config CMake generators, executable paths include per-config subdirectories, which require special handling in tests. Using dedicated environment variables to specify executable paths works well in such scenarios. However, the util_test_runner test sets these variables for the util/test_runner.py script unconditionally, which diverges from the approach used when running functional/test_runner.py.

    This change makes the usage of the aforementioned environment variables uniform.

    Also see: #32183 (review).

  2. test: Treat executable paths in tests consistently
    When using multi-config CMake generators, executable paths include
    per-config subdirectories, which require special handling in tests.
    Using dedicated environment variables to specify executable paths
    works well in such scenarios. However, the `util_test_runner` test
    sets these variables for the `util/test_runner.py` script
    unconditionally, which diverges from the approach used when running
    `functional/test_runner.py`.
    
    This change makes the usage of the aforementioned environment variables
    uniform.
    350210774e
  3. hebasto added the label Build system on Apr 22, 2025
  4. hebasto added the label Tests on Apr 22, 2025
  5. DrahtBot commented at 10:49 am on April 22, 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/32324.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

  6. maflcko commented at 2:17 pm on April 22, 2025: member
    Seems fine. An alternative could be to remove BUILDDIR and replace it with BINDIR, now that all bins are in one dir? BINDIR could include the multi-config subdir path element, if it exists.
  7. hebasto commented at 2:22 pm on April 22, 2025: member

    Seems fine. An alternative could be to remove BUILDDIR and replace it with BINDIR, now that all bins are in one dir? BINDIR could include the multi-config subdir path element, if it exists.

    The question is how to choose the configuration for testing when we built more than one config.

    ctest has the -C option for that.


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-05-05 12:12 UTC

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