functional test fixes and no RUNPATH in linux builds

This commit is contained in:
Tom Trevethan 2026-07-27 15:07:02 +01:00
parent 7055c83b2b
commit 3da0ed810b
No known key found for this signature in database
4 changed files with 42 additions and 28 deletions

View file

@ -162,17 +162,17 @@ if [ "$RUN_CHECK_DEPS" = "true" ]; then
fi
if [ "$RUN_UNIT_TESTS" = "true" ]; then
DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" CTEST_OUTPUT_ON_FAILURE=ON ctest --stop-on-failure "${MAKEJOBS}" --timeout $(( TEST_RUNNER_TIMEOUT_FACTOR * 60 ))
DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib:${BASE_BUILD_DIR}/lib:${BASE_BUILD_DIR}/src/secp256k1/lib" CTEST_OUTPUT_ON_FAILURE=ON ctest --stop-on-failure "${MAKEJOBS}" --timeout $(( TEST_RUNNER_TIMEOUT_FACTOR * 60 ))
fi
if [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" "${BASE_OUTDIR}"/bin/test_elements --catch_system_errors=no -l test_suite
DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib:${BASE_BUILD_DIR}/lib:${BASE_BUILD_DIR}/src/secp256k1/lib" "${BASE_OUTDIR}"/bin/test_elements --catch_system_errors=no -l test_suite
fi
if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then
# parses TEST_RUNNER_EXTRA as an array which allows for multiple arguments such as TEST_RUNNER_EXTRA='--exclude "rpc_bind.py --ipv6"'
eval "TEST_RUNNER_EXTRA=($TEST_RUNNER_EXTRA)"
LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" test/functional/test_runner.py --ci "${MAKEJOBS}" --tmpdirprefix "${BASE_SCRATCH_DIR}"/test_runner/ --ansi --combinedlogslen=99999999 --timeout-factor="${TEST_RUNNER_TIMEOUT_FACTOR}" "${TEST_RUNNER_EXTRA[@]}" --quiet --failfast
LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib:${BASE_BUILD_DIR}/lib:${BASE_BUILD_DIR}/src/secp256k1/lib" test/functional/test_runner.py --ci "${MAKEJOBS}" --tmpdirprefix "${BASE_SCRATCH_DIR}"/test_runner/ --ansi --combinedlogslen=99999999 --timeout-factor="${TEST_RUNNER_TIMEOUT_FACTOR}" "${TEST_RUNNER_EXTRA[@]}" --quiet --failfast
fi
if [ "${RUN_TIDY}" = "true" ]; then
@ -206,5 +206,5 @@ fi
if [ "$RUN_FUZZ_TESTS" = "true" ]; then
# shellcheck disable=SC2086
LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" test/fuzz/test_runner.py ${FUZZ_TESTS_CONFIG} "${MAKEJOBS}" -l DEBUG "${DIR_FUZZ_IN}" --empty_min_time=60
LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib:${BASE_BUILD_DIR}/lib:${BASE_BUILD_DIR}/src/secp256k1/lib" test/fuzz/test_runner.py ${FUZZ_TESTS_CONFIG} "${MAKEJOBS}" -l DEBUG "${DIR_FUZZ_IN}" --empty_min_time=60
fi

View file

@ -277,9 +277,11 @@ if(ENABLE_WALLET)
init/bitcoin-wallet.cpp
wallet/wallettool.cpp
)
set_target_properties(elements-wallet PROPERTIES
SKIP_BUILD_RPATH OFF
)
if(APPLE)
set_target_properties(elements-wallet PROPERTIES
SKIP_BUILD_RPATH OFF
)
endif()
add_windows_resources(elements-wallet bitcoin-wallet-res.rc)
target_link_libraries(elements-wallet
core_interface
@ -421,9 +423,11 @@ if(BUILD_DAEMON)
bitcoind.cpp
init/bitcoind.cpp
)
set_target_properties(elementsd PROPERTIES
SKIP_BUILD_RPATH OFF
)
if(APPLE)
set_target_properties(elementsd PROPERTIES
SKIP_BUILD_RPATH OFF
)
endif()
add_windows_resources(elementsd bitcoind-res.rc)
target_link_libraries(elementsd
core_interface
@ -438,9 +442,11 @@ if(WITH_MULTIPROCESS AND BUILD_DAEMON)
bitcoind.cpp
init/bitcoin-node.cpp
)
set_target_properties(elements-node PROPERTIES
SKIP_BUILD_RPATH OFF
)
if(APPLE)
set_target_properties(elements-node PROPERTIES
SKIP_BUILD_RPATH OFF
)
endif()
target_link_libraries(elements-node
core_interface
bitcoin_node
@ -482,9 +488,11 @@ target_link_libraries(bitcoin_cli
# Elements Core RPC client
if(BUILD_CLI)
add_executable(elements-cli bitcoin-cli.cpp)
set_target_properties(elements-cli PROPERTIES
SKIP_BUILD_RPATH OFF
)
if(APPLE)
set_target_properties(elements-cli PROPERTIES
SKIP_BUILD_RPATH OFF
)
endif()
add_windows_resources(elements-cli bitcoin-cli-res.rc)
target_link_libraries(elements-cli
core_interface
@ -501,9 +509,11 @@ endif()
if(BUILD_TX)
add_executable(elements-tx bitcoin-tx.cpp)
add_windows_resources(elements-tx bitcoin-tx-res.rc)
set_target_properties(elements-tx PROPERTIES
SKIP_BUILD_RPATH OFF
)
if(APPLE)
set_target_properties(elements-tx PROPERTIES
SKIP_BUILD_RPATH OFF
)
endif()
target_link_libraries(elements-tx
core_interface
bitcoin_common
@ -518,9 +528,11 @@ endif()
if(BUILD_UTIL)
add_executable(elements-util bitcoin-util.cpp)
add_windows_resources(elements-util bitcoin-util-res.rc)
set_target_properties(elements-util PROPERTIES
SKIP_BUILD_RPATH OFF
)
if(APPLE)
set_target_properties(elements-util PROPERTIES
SKIP_BUILD_RPATH OFF
)
endif()
target_link_libraries(elements-util
core_interface
bitcoin_common
@ -550,9 +562,11 @@ if(BUILD_UTIL_CHAINSTATE)
# Relevant discussions:
# - https://github.com/hebasto/bitcoin/pull/236#issuecomment-2183120953
# - https://github.com/bitcoin/bitcoin/pull/30312#issuecomment-2191235833
set_target_properties(bitcoin-chainstate PROPERTIES
SKIP_BUILD_RPATH OFF
)
if(APPLE)
set_target_properties(bitcoin-chainstate PROPERTIES
SKIP_BUILD_RPATH OFF
)
endif()
target_link_libraries(bitcoin-chainstate
PRIVATE
core_interface

View file

@ -45,7 +45,7 @@ class WalletTest(BitcoinTestFramework):
assert len(self.nodes[0].listissuances()) == 2 # asset & reisuance token
self.nodes[0].generatetoaddress(1, self.nodes[0].getnewaddress(), called_by_framework=True) # confirm the tx
self.sync_all()
issuance_addr = self.nodes[0].gettransaction(issuance_txid)['details'][0]['address']
self.nodes[1].importaddress(issuance_addr)

View file

@ -54,10 +54,10 @@ def fill_mempool(test_framework, node, *, tx_sync_fun=None):
minrelayfee = node.getnetworkinfo()['relayfee']
tx_batch_size = 1
num_of_batches = 75
num_of_batches = 74
# Generate UTXOs to flood the mempool
# 1 to create a tx initially that will be evicted from the mempool later
# 75 transactions each with a fee rate higher than the previous one
# 74 transactions each with a fee rate higher than the previous one
ephemeral_miniwallet = MiniWallet(node, tag_name="fill_mempool_ephemeral_wallet")
test_framework.generate(ephemeral_miniwallet, 1 + num_of_batches * tx_batch_size)