2018-02-14 14:26:28 +01:00
|
|
|
# This file is part of the Flowee project
|
2021-06-20 22:44:44 +02:00
|
|
|
# Copyright (C) 2018 Tom Zander <tom@flowee.org>
|
2018-02-14 14:26:28 +01:00
|
|
|
#
|
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
# (at your option) any later version.
|
|
|
|
|
#
|
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
|
#
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
2018-02-10 14:59:45 +01:00
|
|
|
enable_testing()
|
|
|
|
|
|
2023-05-02 22:22:51 +02:00
|
|
|
get_property(hub_deb GLOBAL PROPERTY BUILDING_HUB)
|
|
|
|
|
if (hub_deb)
|
2023-03-20 19:46:37 +01:00
|
|
|
add_subdirectory(test)
|
|
|
|
|
set(OTHER_TESTS test_hubOld)
|
|
|
|
|
endif()
|
2023-05-02 22:22:51 +02:00
|
|
|
|
2022-08-20 18:24:55 +02:00
|
|
|
if (${Qt6Core_FOUND})
|
|
|
|
|
find_package(Qt6Test)
|
|
|
|
|
if (${Qt6Test_FOUND})
|
2018-08-14 19:01:37 +02:00
|
|
|
add_subdirectory(common)
|
2021-10-13 16:44:13 +02:00
|
|
|
add_subdirectory(apputils)
|
2018-08-13 23:19:27 +02:00
|
|
|
add_subdirectory(prevector)
|
2018-08-14 09:59:57 +02:00
|
|
|
add_subdirectory(utxo)
|
2022-04-06 11:39:49 +02:00
|
|
|
add_subdirectory(utils)
|
2018-12-15 21:33:44 +01:00
|
|
|
add_subdirectory(streaming)
|
2019-03-23 20:34:30 +01:00
|
|
|
add_subdirectory(networkmanager)
|
2019-04-01 18:34:39 +02:00
|
|
|
add_subdirectory(hashstorage)
|
2021-05-27 18:40:58 +02:00
|
|
|
add_subdirectory(p2pnet)
|
2018-08-14 20:13:33 +02:00
|
|
|
|
2023-05-02 22:22:51 +02:00
|
|
|
if (hub_deb)
|
2023-03-20 19:46:37 +01:00
|
|
|
add_subdirectory(hub)
|
|
|
|
|
add_subdirectory(api)
|
|
|
|
|
add_subdirectory(bitcoin-protocol)
|
|
|
|
|
add_subdirectory(blockvalidation)
|
|
|
|
|
list(APPEND OTHER_TESTS
|
|
|
|
|
test_hub
|
|
|
|
|
test_protocol
|
|
|
|
|
test_blockvalidation
|
|
|
|
|
|
|
|
|
|
test_api_live
|
|
|
|
|
test_api_blockchain
|
|
|
|
|
test_api_address_monitor
|
|
|
|
|
test_api_double_spend_monitor
|
|
|
|
|
test_api_txid_monitor
|
|
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
|
2022-09-10 00:35:59 +02:00
|
|
|
find_package(Qt6Network)
|
|
|
|
|
if (${Qt6Network_FOUND})
|
|
|
|
|
add_subdirectory(httpengine)
|
2023-03-20 19:46:37 +01:00
|
|
|
list(APPEND OTHER_TESTS test_httpengine)
|
2022-09-10 00:35:59 +02:00
|
|
|
endif ()
|
2019-06-04 16:25:26 +02:00
|
|
|
|
2023-08-16 16:03:21 +02:00
|
|
|
option(test_proto_builder "Enable testing of the protocol buffer unit test" OFF)
|
|
|
|
|
if (test-proto_builder)
|
|
|
|
|
find_package(Protobuf REQUIRED)
|
|
|
|
|
if (Protobuf_FOUND)
|
|
|
|
|
add_subdirectory(protobuf)
|
|
|
|
|
LIST (APPEND OTHER_TESTS test_protobuf)
|
|
|
|
|
endif ()
|
2023-07-08 21:36:39 +02:00
|
|
|
endif ()
|
|
|
|
|
|
2018-08-14 20:13:33 +02:00
|
|
|
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS
|
|
|
|
|
test_utxo
|
2022-04-06 11:39:49 +02:00
|
|
|
test_utils
|
2021-10-13 16:44:13 +02:00
|
|
|
test_apputils
|
2018-08-14 20:13:33 +02:00
|
|
|
test_prevector
|
2018-12-15 21:33:44 +01:00
|
|
|
test_streaming
|
2019-03-23 20:34:30 +01:00
|
|
|
test_networkmanager
|
2019-04-01 18:34:39 +02:00
|
|
|
test_hashstorage
|
2021-05-27 18:40:58 +02:00
|
|
|
test_p2pnet
|
2023-03-20 19:46:37 +01:00
|
|
|
${OTHER_TESTS}
|
2018-08-14 20:13:33 +02:00
|
|
|
)
|
2018-08-13 23:19:27 +02:00
|
|
|
else ()
|
2022-08-20 18:24:55 +02:00
|
|
|
message("Missing qt6 (test) library, not building some tests")
|
2018-08-13 23:19:27 +02:00
|
|
|
endif ()
|
|
|
|
|
endif()
|