2021-01-14 14:55:58 +03:00
|
|
|
include(DefinePlatformDefaults)
|
2017-08-14 20:19:52 +03:00
|
|
|
|
2018-10-12 15:52:18 +03:00
|
|
|
include(nextcloud_add_test.cmake)
|
2011-03-18 03:14:45 +03:00
|
|
|
|
2020-12-10 18:50:59 +03:00
|
|
|
set(CMAKE_AUTOMOC TRUE)
|
2021-01-15 01:07:32 +03:00
|
|
|
|
2021-02-01 23:07:17 +03:00
|
|
|
add_library(testutils
|
|
|
|
STATIC
|
|
|
|
syncenginetestutils.cpp
|
|
|
|
pushnotificationstestutils.cpp
|
2021-02-16 12:20:04 +03:00
|
|
|
themeutils.cpp
|
2021-07-23 18:41:02 +03:00
|
|
|
testhelper.cpp
|
2021-02-01 23:07:17 +03:00
|
|
|
)
|
2020-12-10 18:50:59 +03:00
|
|
|
|
2021-10-05 13:00:22 +03:00
|
|
|
target_link_libraries(testutils PUBLIC Nextcloud::sync Qt5::Test)
|
2021-02-01 23:07:17 +03:00
|
|
|
target_include_directories(testutils PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
2021-05-07 15:10:44 +03:00
|
|
|
set_target_properties(testutils PROPERTIES FOLDER Tests)
|
2021-02-01 23:07:17 +03:00
|
|
|
|
|
|
|
nextcloud_add_test(NextcloudPropagator)
|
2020-03-11 00:10:45 +03:00
|
|
|
|
|
|
|
IF(BUILD_UPDATER)
|
2021-02-01 23:07:17 +03:00
|
|
|
nextcloud_add_test(Updater)
|
2020-03-11 00:10:45 +03:00
|
|
|
endif()
|
2014-01-23 16:20:01 +04:00
|
|
|
|
2021-02-01 23:07:17 +03:00
|
|
|
nextcloud_add_test(NetrcParser)
|
|
|
|
nextcloud_add_test(OwnSql)
|
|
|
|
nextcloud_add_test(SyncJournalDB)
|
|
|
|
nextcloud_add_test(SyncFileItem)
|
|
|
|
nextcloud_add_test(ConcatUrl)
|
|
|
|
nextcloud_add_test(Cookies)
|
|
|
|
nextcloud_add_test(XmlParse)
|
|
|
|
nextcloud_add_test(ChecksumValidator)
|
|
|
|
|
|
|
|
nextcloud_add_test(ClientSideEncryption)
|
|
|
|
nextcloud_add_test(ExcludedFiles)
|
|
|
|
|
|
|
|
nextcloud_add_test(Utility)
|
|
|
|
nextcloud_add_test(SyncEngine)
|
|
|
|
nextcloud_add_test(SyncVirtualFiles)
|
|
|
|
nextcloud_add_test(SyncMove)
|
|
|
|
nextcloud_add_test(SyncDelete)
|
|
|
|
nextcloud_add_test(SyncConflict)
|
|
|
|
nextcloud_add_test(SyncFileStatusTracker)
|
|
|
|
nextcloud_add_test(Download)
|
|
|
|
nextcloud_add_test(ChunkingNg)
|
|
|
|
nextcloud_add_test(AsyncOp)
|
|
|
|
nextcloud_add_test(UploadReset)
|
|
|
|
nextcloud_add_test(AllFilesDeleted)
|
|
|
|
nextcloud_add_test(Blacklist)
|
|
|
|
nextcloud_add_test(LocalDiscovery)
|
|
|
|
nextcloud_add_test(RemoteDiscovery)
|
|
|
|
nextcloud_add_test(Permissions)
|
|
|
|
nextcloud_add_test(SelectiveSync)
|
|
|
|
nextcloud_add_test(DatabaseError)
|
|
|
|
nextcloud_add_test(LockedFiles)
|
|
|
|
nextcloud_add_test(FolderWatcher)
|
|
|
|
nextcloud_add_test(Capabilities)
|
|
|
|
nextcloud_add_test(PushNotifications)
|
2021-02-16 12:20:04 +03:00
|
|
|
nextcloud_add_test(Theme)
|
2021-08-17 16:39:18 +03:00
|
|
|
nextcloud_add_test(IconUtils)
|
2021-09-09 12:18:22 +03:00
|
|
|
nextcloud_add_test(SetUserStatusDialog)
|
2021-09-09 14:33:57 +03:00
|
|
|
nextcloud_add_test(UnifiedSearchListmodel)
|
2021-12-23 13:57:08 +03:00
|
|
|
nextcloud_add_test(ActivityListModel)
|
2022-01-20 14:54:36 +03:00
|
|
|
nextcloud_add_test(ActivityData)
|
2022-01-23 21:10:16 +03:00
|
|
|
nextcloud_add_test(TalkReply)
|
2022-04-21 14:57:12 +03:00
|
|
|
nextcloud_add_test(LockFile)
|
2017-04-13 14:02:00 +03:00
|
|
|
|
|
|
|
if( UNIX AND NOT APPLE )
|
2021-02-01 23:07:17 +03:00
|
|
|
nextcloud_add_test(InotifyWatcher)
|
2017-04-13 14:02:00 +03:00
|
|
|
endif(UNIX AND NOT APPLE)
|
|
|
|
|
2020-12-18 14:37:03 +03:00
|
|
|
if (WIN32)
|
2021-06-11 20:17:10 +03:00
|
|
|
include_directories(
|
|
|
|
${CMAKE_BINARY_DIR}/src/libsync/vfs/cfapi
|
|
|
|
)
|
|
|
|
|
2021-02-01 23:07:17 +03:00
|
|
|
nextcloud_add_test(SyncCfApi)
|
2022-07-04 15:36:06 +03:00
|
|
|
nextcloud_add_test(CfApiShellExtensionsIPC)
|
|
|
|
target_sources(CfApiShellExtensionsIPCTest PRIVATE "${CMAKE_SOURCE_DIR}/src/libsync/vfs/cfapi/shellext/thumbnailprovideripc.cpp")
|
2021-01-14 14:55:58 +03:00
|
|
|
elseif(LINUX) # elseif(LINUX OR APPLE)
|
2021-02-01 23:07:17 +03:00
|
|
|
nextcloud_add_test(SyncXAttr)
|
2020-12-18 14:37:03 +03:00
|
|
|
endif()
|
|
|
|
|
2021-02-12 16:44:32 +03:00
|
|
|
nextcloud_add_test(LongPath)
|
2021-02-01 23:07:17 +03:00
|
|
|
nextcloud_add_benchmark(LargeSync)
|
2015-07-13 15:35:19 +03:00
|
|
|
|
2021-07-28 17:43:29 +03:00
|
|
|
nextcloud_add_test(Account)
|
2021-02-01 23:07:17 +03:00
|
|
|
nextcloud_add_test(FolderMan)
|
|
|
|
nextcloud_add_test(RemoteWipe)
|
2019-07-24 14:56:21 +03:00
|
|
|
|
2021-02-01 23:07:17 +03:00
|
|
|
nextcloud_add_test(OAuth)
|
2017-09-25 19:23:39 +03:00
|
|
|
|
2017-06-22 16:11:27 +03:00
|
|
|
configure_file(test_journal.db "${PROJECT_BINARY_DIR}/bin/test_journal.db" COPYONLY)
|
2017-08-14 19:49:44 +03:00
|
|
|
|
|
|
|
find_package(CMocka)
|
|
|
|
if (CMOCKA_FOUND)
|
|
|
|
include(AddCMockaTest)
|
|
|
|
add_subdirectory(csync)
|
|
|
|
endif (CMOCKA_FOUND)
|