mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-27 06:45:49 +03:00
aad928a6be
Installing to lib/${APPLICATION_EXECUTABLE} has caused a bunch of irritations in the past and subtle annoying to fix bugs. To avoid name clashes with branded clients ${APPLICATION_EXECUTABLE} becomes now part of the filename instead of the subfolder. The concrete motivation to change this now is that on Windows there is no RPATH and it's not possible to run owncloud directly from the Craft Root folder, which is nice when you're developing on Windows. It would have been possible to change this just for Windows but as written earlier this has caused lots of issues and thus I think it's a good idea to just stay consistent accross platforms when touching it.
40 lines
1.4 KiB
CMake
40 lines
1.4 KiB
CMake
project(tests)
|
|
|
|
set(TORTURE_LIBRARY torture)
|
|
|
|
include_directories(
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
${CMAKE_BINARY_DIR}
|
|
${CMOCKA_INCLUDE_DIR}
|
|
)
|
|
|
|
include_directories(${CHECK_INCLUDE_DIRS})
|
|
# create test library
|
|
add_library(${TORTURE_LIBRARY} STATIC torture.c cmdline.c)
|
|
target_link_libraries(${TORTURE_LIBRARY} ${CMOCKA_LIBRARIES} ${CSYNC_LIBRARY})
|
|
|
|
set(TEST_TARGET_LIBRARIES ${TORTURE_LIBRARY} Qt5::Core ocsync_${APPLICATION_EXECUTABLE})
|
|
|
|
# create tests
|
|
|
|
# std
|
|
add_cmocka_test(check_std_c_alloc std_tests/check_std_c_alloc.c ${TEST_TARGET_LIBRARIES})
|
|
add_cmocka_test(check_std_c_jhash std_tests/check_std_c_jhash.c ${TEST_TARGET_LIBRARIES})
|
|
add_cmocka_test(check_std_c_str std_tests/check_std_c_str.c ${TEST_TARGET_LIBRARIES})
|
|
|
|
|
|
# csync tests
|
|
add_cmocka_test(check_csync_exclude csync_tests/check_csync_exclude.cpp ${TEST_TARGET_LIBRARIES})
|
|
add_cmocka_test(check_csync_util csync_tests/check_csync_util.cpp ${TEST_TARGET_LIBRARIES})
|
|
add_cmocka_test(check_csync_misc csync_tests/check_csync_misc.cpp ${TEST_TARGET_LIBRARIES})
|
|
|
|
# vio
|
|
add_cmocka_test(check_vio vio_tests/check_vio.cpp ${TEST_TARGET_LIBRARIES})
|
|
add_cmocka_test(check_vio_ext vio_tests/check_vio_ext.cpp ${TEST_TARGET_LIBRARIES})
|
|
|
|
# sync
|
|
add_cmocka_test(check_csync_update csync_tests/check_csync_update.cpp ${TEST_TARGET_LIBRARIES})
|
|
|
|
# encoding
|
|
add_cmocka_test(check_encoding_functions encoding_tests/check_encoding.cpp ${TEST_TARGET_LIBRARIES})
|
|
|