2020-03-03 04:15:18 +00:00
|
|
|
if (WITH_HIVE)
|
2022-07-28 16:07:38 +00:00
|
|
|
add_custom_target(hive_build DEPENDS lokinet-amalgum pyllarp)
|
2020-03-03 04:15:18 +00:00
|
|
|
add_custom_target(hive ${CMAKE_COMMAND} -E
|
2020-03-03 05:37:05 +00:00
|
|
|
env PYTHONPATH="$ENV{PYTHONPATH}:${CMAKE_BINARY_DIR}/pybind"
|
2020-03-03 04:15:18 +00:00
|
|
|
${PYTHON_EXECUTABLE} -m pytest
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/hive
|
|
|
|
DEPENDS
|
2020-03-03 19:56:33 +00:00
|
|
|
hive_build)
|
2020-03-03 04:15:18 +00:00
|
|
|
endif()
|
|
|
|
|
2020-02-17 13:24:57 +00:00
|
|
|
add_subdirectory(Catch2)
|
2021-03-04 20:45:52 +00:00
|
|
|
add_executable(testAll
|
2021-03-01 21:07:32 +00:00
|
|
|
# helpers
|
|
|
|
check_main.cpp
|
|
|
|
test_util.cpp
|
|
|
|
# actual test cases
|
|
|
|
config/test_llarp_config_definition.cpp
|
|
|
|
config/test_llarp_config_ini.cpp
|
|
|
|
config/test_llarp_config_output.cpp
|
2022-07-09 15:05:52 +00:00
|
|
|
config/test_llarp_config_values.cpp
|
2022-07-28 16:07:38 +00:00
|
|
|
crypto/test_llarp_crypto_types.cpp
|
2021-03-01 21:07:32 +00:00
|
|
|
crypto/test_llarp_crypto.cpp
|
|
|
|
crypto/test_llarp_key_manager.cpp
|
|
|
|
dns/test_llarp_dns_dns.cpp
|
|
|
|
net/test_ip_address.cpp
|
|
|
|
net/test_llarp_net.cpp
|
|
|
|
net/test_sock_addr.cpp
|
2020-02-14 21:11:54 +00:00
|
|
|
nodedb/test_nodedb.cpp
|
2020-02-10 17:12:20 +00:00
|
|
|
path/test_path.cpp
|
2021-03-01 21:07:32 +00:00
|
|
|
router/test_llarp_router_version.cpp
|
|
|
|
routing/test_llarp_routing_transfer_traffic.cpp
|
|
|
|
routing/test_llarp_routing_obtainexitmessage.cpp
|
|
|
|
service/test_llarp_service_address.cpp
|
|
|
|
service/test_llarp_service_identity.cpp
|
|
|
|
service/test_llarp_service_name.cpp
|
|
|
|
util/meta/test_llarp_util_memfn.cpp
|
|
|
|
util/thread/test_llarp_util_queue_manager.cpp
|
|
|
|
util/thread/test_llarp_util_queue.cpp
|
|
|
|
util/test_llarp_util_aligned.cpp
|
|
|
|
util/test_llarp_util_bencode.cpp
|
2020-02-23 19:35:25 +00:00
|
|
|
util/test_llarp_util_bits.cpp
|
2021-03-01 21:07:32 +00:00
|
|
|
util/test_llarp_util_decaying_hashset.cpp
|
|
|
|
util/test_llarp_util_log_level.cpp
|
2020-02-22 19:55:53 +00:00
|
|
|
util/test_llarp_util_str.cpp
|
2021-03-01 21:07:32 +00:00
|
|
|
test_llarp_encrypted_frame.cpp
|
|
|
|
test_llarp_router_contact.cpp)
|
2020-02-10 17:12:20 +00:00
|
|
|
|
2022-07-28 16:07:38 +00:00
|
|
|
|
|
|
|
if(WITH_PEERSTATS_BACKEND)
|
2022-08-30 19:23:06 +00:00
|
|
|
target_sources(testAll PRIVATE
|
|
|
|
peerstats/test_peer_db.cpp
|
|
|
|
peerstats/test_peer_types.cpp)
|
|
|
|
endif()
|
|
|
|
|
2022-07-28 16:07:38 +00:00
|
|
|
target_link_libraries(testAll PUBLIC lokinet-amalgum Catch2::Catch2)
|
2021-03-04 20:45:52 +00:00
|
|
|
target_include_directories(testAll PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
2022-07-28 16:07:38 +00:00
|
|
|
|
2021-03-01 21:07:32 +00:00
|
|
|
if(WIN32)
|
2021-03-04 20:45:52 +00:00
|
|
|
target_sources(testAll PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/win32/test.rc")
|
|
|
|
target_link_libraries(testAll PUBLIC ws2_32 iphlpapi shlwapi)
|
2021-03-01 21:07:32 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
2021-03-04 20:45:52 +00:00
|
|
|
target_link_directories(testAll PRIVATE /usr/local/lib)
|
2021-03-01 21:07:32 +00:00
|
|
|
endif()
|
|
|
|
|
2021-03-04 20:45:52 +00:00
|
|
|
add_custom_target(check COMMAND testAll)
|