Changeset View
Changeset View
Standalone View
Standalone View
test/CMakeLists.txt
Show All 19 Lines | |||||
# Create build ini file | # Create build ini file | ||||
configure_file(config.ini.in config.ini @ONLY) | configure_file(config.ini.in config.ini @ONLY) | ||||
### | ### | ||||
# Setup symlinks for testing | # Setup symlinks for testing | ||||
### | ### | ||||
macro(make_link src dest) | include(SanitizeHelper) | ||||
function(make_link file) | |||||
set(dest "${CMAKE_CURRENT_BINARY_DIR}/${file}") | |||||
add_custom_command( | add_custom_command( | ||||
OUTPUT "${dest}" | OUTPUT "${dest}" | ||||
COMMAND ${CMAKE_COMMAND} -E create_symlink "${src}" "${dest}" | COMMAND ${CMAKE_COMMAND} -E create_symlink "${file}" "${dest}" | ||||
COMMENT "make_link ${src} -> ${dest}" | COMMENT "link ${file} -> ${dest}" | ||||
MAIN_DEPENDENCY "${src}" | MAIN_DEPENDENCY "${file}" | ||||
) | ) | ||||
endmacro() | # Add a phony target to make sure the files are linked by default. | ||||
sanitize_target_name("link-" "${file}" NAME) | |||||
add_custom_target(${NAME} ALL DEPENDS "${dest}") | |||||
endfunction() | |||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/functional/) | file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/functional/) | ||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/util/) | file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/util/) | ||||
make_link( | make_link(functional/test_runner.py) | ||||
${CMAKE_CURRENT_SOURCE_DIR}/functional/test_runner.py | make_link(util/bitcoin-util-test.py) | ||||
${CMAKE_CURRENT_BINARY_DIR}/functional/test_runner.py | make_link(util/rpcauth-test.py) | ||||
) | |||||
make_link( | |||||
${CMAKE_CURRENT_SOURCE_DIR}/util/bitcoin-util-test.py | |||||
${CMAKE_CURRENT_BINARY_DIR}/util/bitcoin-util-test.py | |||||
) | |||||
make_link( | |||||
${CMAKE_CURRENT_SOURCE_DIR}/util/rpcauth-test.py | |||||
${CMAKE_CURRENT_BINARY_DIR}/util/rpcauth-test.py | |||||
) | |||||
add_custom_target(check-functional | add_custom_target(check-functional | ||||
COMMENT "Run functional tests..." | COMMENT "Run functional tests..." | ||||
COMMAND | COMMAND | ||||
"${PYTHON_EXECUTABLE}" | "${PYTHON_EXECUTABLE}" | ||||
./functional/test_runner.py | ./functional/test_runner.py | ||||
DEPENDS | DEPENDS | ||||
../src/bitcoind | ../src/bitcoind | ||||
Show All 39 Lines |