diff --git a/cmake/modules/TestSuite.cmake b/cmake/modules/TestSuite.cmake --- a/cmake/modules/TestSuite.cmake +++ b/cmake/modules/TestSuite.cmake @@ -59,15 +59,20 @@ ${_test_name} ${NAME} -t "${_test_name}" ) - if(TEST_WITH_UPGRADE_ACTIVATED) - _add_test_runner( - ${SUITE} - "${_test_name}-upgrade-activated" - ${NAME} -t "${_test_name}" - # Dec. 1st, 2019 at 00:00:00 - -- -phononactivationtime=1575158400 - ) + + set(SUITE_UPGRADE_ACTIVATED "${SUITE}-upgrade-activated") + set(TARGET_UPGRADE_ACTIVATED "check-${SUITE_UPGRADE_ACTIVATED}") + if(NOT TARGET ${TARGET_UPGRADE_ACTIVATED}) + create_test_suite(${SUITE_UPGRADE_ACTIVATED}) + add_dependencies(${TARGET_UPGRADE_ACTIVATED} ${NAME}) endif() + _add_test_runner( + ${SUITE_UPGRADE_ACTIVATED} + "${_test_name}" + ${NAME} -t "${_test_name}" + # Dec. 1st, 2019 at 00:00:00 + -- -phononactivationtime=1575158400 + ) endforeach() find_package(Boost 1.58 REQUIRED unit_test_framework) diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -2,8 +2,6 @@ project(bitcoin-test) -option(TEST_WITH_UPGRADE_ACTIVATED "Run unit tests with the next upgrade activated in addition to regular tests" OFF) - # Process json files. file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/data")