2018-06-11 20:02:27 +02:00
|
|
|
enable_testing()
|
|
|
|
|
2019-04-29 19:32:46 +02:00
|
|
|
set(TEST_LIST
|
2021-12-22 19:45:33 +01:00
|
|
|
base64
|
|
|
|
crypto
|
|
|
|
group_session
|
|
|
|
list
|
|
|
|
megolm
|
|
|
|
message
|
|
|
|
olm
|
|
|
|
olm_decrypt
|
|
|
|
olm_sha256
|
|
|
|
olm_signature
|
|
|
|
olm_using_malloc
|
|
|
|
session
|
|
|
|
pk
|
|
|
|
sas
|
2019-04-29 19:32:46 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Windows" AND BUILD_SHARED_LIBS))
|
|
|
|
# test_ratchet doesn't work on Windows when building a DLL, because it tries
|
|
|
|
# to use internal symbols, so only enable it if we're not on Windows, or if
|
|
|
|
# we're building statically
|
2021-12-22 19:45:33 +01:00
|
|
|
set(TEST_LIST ${TEST_LIST} ratchet)
|
2019-04-29 19:32:46 +02:00
|
|
|
endif()
|
|
|
|
|
|
|
|
foreach(test IN ITEMS ${TEST_LIST})
|
2021-12-22 19:45:33 +01:00
|
|
|
add_executable(test_${test} test_${test}.cpp)
|
|
|
|
target_include_directories(test_${test} PRIVATE include)
|
|
|
|
target_link_libraries(test_${test} Olm::Olm)
|
|
|
|
|
|
|
|
add_test(${test} test_${test} --reporters=console,junit --out=${test}.xml)
|
2018-10-12 22:15:16 +02:00
|
|
|
endforeach(test)
|
2018-06-11 20:02:27 +02:00
|
|
|
|