mirror of https://github.com/bitcoin/bitcoin
parent
3d85379570
commit
a8a2e364ac
@ -0,0 +1,15 @@
|
|||||||
|
# Copyright (c) 2023-present The Bitcoin Core developers
|
||||||
|
# Distributed under the MIT software license, see the accompanying
|
||||||
|
# file COPYING or https://opensource.org/license/mit/.
|
||||||
|
|
||||||
|
if(TARGET bitcoin-util AND TARGET bitcoin-tx AND PYTHON_COMMAND)
|
||||||
|
add_test(NAME util_test_runner
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E env BITCOINUTIL=$<TARGET_FILE:bitcoin-util> BITCOINTX=$<TARGET_FILE:bitcoin-tx> ${PYTHON_COMMAND} ${PROJECT_BINARY_DIR}/test/util/test_runner.py
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(PYTHON_COMMAND)
|
||||||
|
add_test(NAME util_rpcauth_test
|
||||||
|
COMMAND ${PYTHON_COMMAND} ${PROJECT_BINARY_DIR}/test/util/rpcauth-test.py
|
||||||
|
)
|
||||||
|
endif()
|
@ -0,0 +1,48 @@
|
|||||||
|
# Copyright (c) 2023-present The Bitcoin Core developers
|
||||||
|
# Distributed under the MIT software license, see the accompanying
|
||||||
|
# file COPYING or https://opensource.org/license/mit/.
|
||||||
|
|
||||||
|
function(create_test_config)
|
||||||
|
set(abs_top_srcdir ${PROJECT_SOURCE_DIR})
|
||||||
|
set(abs_top_builddir ${PROJECT_BINARY_DIR})
|
||||||
|
set(EXEEXT ${CMAKE_EXECUTABLE_SUFFIX})
|
||||||
|
|
||||||
|
macro(set_configure_variable var conf_var)
|
||||||
|
if(${var})
|
||||||
|
set(${conf_var}_TRUE "")
|
||||||
|
else()
|
||||||
|
set(${conf_var}_TRUE "#")
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
set_configure_variable(ENABLE_WALLET ENABLE_WALLET)
|
||||||
|
set_configure_variable(WITH_SQLITE USE_SQLITE)
|
||||||
|
set_configure_variable(WITH_BDB USE_BDB)
|
||||||
|
set_configure_variable(BUILD_CLI BUILD_BITCOIN_CLI)
|
||||||
|
set_configure_variable(BUILD_UTIL BUILD_BITCOIN_UTIL)
|
||||||
|
set_configure_variable(BUILD_WALLET_TOOL BUILD_BITCOIN_WALLET)
|
||||||
|
set_configure_variable(BUILD_DAEMON BUILD_BITCOIND)
|
||||||
|
set_configure_variable(BUILD_FUZZ_BINARY ENABLE_FUZZ_BINARY)
|
||||||
|
set_configure_variable(WITH_ZMQ ENABLE_ZMQ)
|
||||||
|
set_configure_variable(ENABLE_EXTERNAL_SIGNER ENABLE_EXTERNAL_SIGNER)
|
||||||
|
set_configure_variable(WITH_USDT ENABLE_USDT_TRACEPOINTS)
|
||||||
|
|
||||||
|
configure_file(config.ini.in config.ini @ONLY)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
create_test_config()
|
||||||
|
|
||||||
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/functional)
|
||||||
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/fuzz)
|
||||||
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/util)
|
||||||
|
|
||||||
|
file(GLOB_RECURSE functional_tests RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} functional/*)
|
||||||
|
foreach(script ${functional_tests} fuzz/test_runner.py util/rpcauth-test.py util/test_runner.py)
|
||||||
|
if(CMAKE_HOST_WIN32)
|
||||||
|
set(symlink)
|
||||||
|
else()
|
||||||
|
set(symlink SYMBOLIC)
|
||||||
|
endif()
|
||||||
|
file(CREATE_LINK ${CMAKE_CURRENT_SOURCE_DIR}/${script} ${CMAKE_CURRENT_BINARY_DIR}/${script} COPY_ON_ERROR ${symlink})
|
||||||
|
endforeach()
|
||||||
|
unset(functional_tests)
|
Loading…
Reference in new issue