test: run functional tests from ctest #31312

pull BrandonOdiwuor wants to merge 1 commits into bitcoin:master from BrandonOdiwuor:ctest-functional-test changing 2 files +8 −0
  1. BrandonOdiwuor commented at 9:06 am on November 18, 2024: contributor

    Fixes #18816

    This PR enables functional tests to be included in the ctest suite when the ENABLE_FUNCTIONAL_TESTS flag is set to ON during the CMake configuration.

    i.e

    0cmake -B build -DENABLE_FUNCTIONAL_TESTS=ON
    1cmake --build build
    2ctest --test-dir build
    
  2. test: run functional tests from ctest 1a977699dd
  3. DrahtBot commented at 9:06 am on November 18, 2024: 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/31312.

    Reviews

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

  4. DrahtBot added the label Tests on Nov 18, 2024
  5. in test/CMakeLists.txt:52 in 1a977699dd
    45@@ -46,3 +46,9 @@ foreach(script ${functional_tests} fuzz/test_runner.py util/rpcauth-test.py util
    46   file(CREATE_LINK ${CMAKE_CURRENT_SOURCE_DIR}/${script} ${CMAKE_CURRENT_BINARY_DIR}/${script} COPY_ON_ERROR ${symlink})
    47 endforeach()
    48 unset(functional_tests)
    49+
    50+if (ENABLE_FUNCTIONAL_TESTS AND PYTHON_COMMAND)
    51+  add_test(NAME functional_test_runner
    52+    COMMAND ${PYTHON_COMMAND} ${PROJECT_BINARY_DIR}/test/functional/test_runner.py
    


    maflcko commented at 9:24 am on November 18, 2024:

    I guess the downside is that one can’t pass any options to it.

    Also, it is using the default -j here to run in parallel with the ctest -j.

    Maybe it wasn’t a good idea to begin with and using a bash alias or justfile is good enough?

  6. BrandonOdiwuor closed this on Nov 18, 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-11-21 06:12 UTC

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