2017-12-14 19:54:31 +03:00
|
|
|
project(tests)
|
2008-02-27 20:56:47 +03:00
|
|
|
|
2012-10-16 12:37:40 +04:00
|
|
|
set(TORTURE_LIBRARY torture)
|
2008-02-27 20:56:47 +03:00
|
|
|
|
|
|
|
include_directories(
|
2017-08-14 19:49:44 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
2008-02-27 20:56:47 +03:00
|
|
|
${CMAKE_BINARY_DIR}
|
2012-10-27 21:27:14 +04:00
|
|
|
${CMOCKA_INCLUDE_DIR}
|
2021-01-15 01:07:32 +03:00
|
|
|
${CHECK_INCLUDE_DIRS}
|
|
|
|
${CMAKE_BINARY_DIR}/src/csync
|
2008-02-27 20:56:47 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
# create test library
|
2012-10-16 12:37:40 +04:00
|
|
|
add_library(${TORTURE_LIBRARY} STATIC torture.c cmdline.c)
|
2018-06-20 10:53:21 +03:00
|
|
|
target_link_libraries(${TORTURE_LIBRARY} ${CMOCKA_LIBRARIES})
|
2008-02-27 20:56:47 +03:00
|
|
|
|
2021-10-05 13:00:22 +03:00
|
|
|
set(TEST_TARGET_LIBRARIES ${TORTURE_LIBRARY} Qt5::Core Nextcloud::csync)
|
2008-02-27 20:56:47 +03:00
|
|
|
|
|
|
|
# create tests
|
|
|
|
|
|
|
|
# std
|
2020-07-16 15:21:38 +03:00
|
|
|
|
2012-10-16 12:37:40 +04:00
|
|
|
add_cmocka_test(check_std_c_jhash std_tests/check_std_c_jhash.c ${TEST_TARGET_LIBRARIES})
|
2017-12-14 17:36:19 +03:00
|
|
|
|
2008-04-07 19:16:41 +04:00
|
|
|
# vio
|
2017-08-14 17:19:52 +03:00
|
|
|
add_cmocka_test(check_vio_ext vio_tests/check_vio_ext.cpp ${TEST_TARGET_LIBRARIES})
|