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
|
|
|
|
2022-11-28 13:57:32 +03:00
|
|
|
find_package(Qt${QT_VERSION_MAJOR}Core5Compat ${REQUIRED_QT_VERSION} CONFIG QUIET)
|
|
|
|
|
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
|
2022-10-18 18:15:10 +03:00
|
|
|
sharetestutils.cpp
|
2022-10-21 15:45:00 +03:00
|
|
|
endtoendtestutils.cpp
|
2023-03-01 01:59:27 +03:00
|
|
|
activitylistmodeltestutils.cpp
|
2021-02-01 23:07:17 +03:00
|
|
|
)
|
2020-12-10 18:50:59 +03:00
|
|
|
|
2022-11-28 13:57:32 +03:00
|
|
|
target_link_libraries(testutils PUBLIC Nextcloud::sync Qt::Test Qt::Core5Compat)
|
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)
|
2023-05-08 19:06:23 +03:00
|
|
|
nextcloud_add_test(ClientSideEncryptionV2)
|
2024-05-15 16:18:15 +03:00
|
|
|
|
|
|
|
if (NOT APPLE)
|
|
|
|
nextcloud_add_test(ExcludedFiles)
|
|
|
|
endif()
|
2021-02-01 23:07:17 +03:00
|
|
|
|
|
|
|
nextcloud_add_test(Utility)
|
2024-05-15 16:18:15 +03:00
|
|
|
|
|
|
|
if (NOT APPLE)
|
|
|
|
nextcloud_add_test(SyncEngine)
|
|
|
|
endif()
|
|
|
|
|
2021-02-01 23:07:17 +03:00
|
|
|
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)
|
2024-05-15 16:18:15 +03:00
|
|
|
|
|
|
|
if (NOT APPLE)
|
|
|
|
nextcloud_add_test(Permissions)
|
|
|
|
endif()
|
|
|
|
|
2021-02-01 23:07:17 +03:00
|
|
|
nextcloud_add_test(SelectiveSync)
|
|
|
|
nextcloud_add_test(DatabaseError)
|
|
|
|
nextcloud_add_test(LockedFiles)
|
2024-05-15 15:18:05 +03:00
|
|
|
|
|
|
|
if (NOT WIN32)
|
|
|
|
nextcloud_add_test(FolderWatcher)
|
|
|
|
endif()
|
|
|
|
|
2021-02-01 23:07:17 +03:00
|
|
|
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)
|
2023-03-01 14:26:29 +03:00
|
|
|
nextcloud_add_test(SortedActivityListModel)
|
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)
|
2022-10-06 14:21:33 +03:00
|
|
|
nextcloud_add_test(ShareModel)
|
2022-10-17 11:37:14 +03:00
|
|
|
nextcloud_add_test(ShareeModel)
|
2022-10-18 21:31:32 +03:00
|
|
|
nextcloud_add_test(SortedShareModel)
|
2023-01-12 20:55:04 +03:00
|
|
|
nextcloud_add_test(SecureFileDrop)
|
2023-04-24 10:49:33 +03:00
|
|
|
nextcloud_add_test(FileTagModel)
|
2023-05-02 14:55:17 +03:00
|
|
|
nextcloud_add_test(SyncConflictsModel)
|
2023-09-12 16:11:03 +03:00
|
|
|
nextcloud_add_test(DateFieldBackend)
|
2023-11-27 20:47:17 +03:00
|
|
|
nextcloud_add_test(ClientStatusReporting)
|
2023-01-12 20:55:04 +03:00
|
|
|
|
|
|
|
target_link_libraries(SecureFileDropTest PRIVATE Nextcloud::sync)
|
|
|
|
configure_file(fake2eelocksucceeded.json "${PROJECT_BINARY_DIR}/bin/fake2eelocksucceeded.json" COPYONLY)
|
|
|
|
configure_file(fakefiledrope2eefoldermetadata.json "${PROJECT_BINARY_DIR}/bin/fakefiledrope2eefoldermetadata.json" COPYONLY)
|
2023-04-04 20:33:53 +03:00
|
|
|
configure_file(e2etestsfakecert.pem "${PROJECT_BINARY_DIR}/bin/e2etestsfakecert.pem" COPYONLY)
|
|
|
|
configure_file(e2etestsfakecertprivatekey.pem "${PROJECT_BINARY_DIR}/bin/e2etestsfakecertprivatekey.pem" COPYONLY)
|
|
|
|
configure_file(e2etestsfakecertpublickey.pem "${PROJECT_BINARY_DIR}/bin/e2etestsfakecertpublickey.pem" COPYONLY)
|
2024-04-15 07:44:06 +03:00
|
|
|
configure_file(fake2eelocksucceeded.json "${PROJECT_BINARY_DIR}/bin/fakeshortcut.base64" COPYONLY)
|
2023-01-12 20:55:04 +03:00
|
|
|
|
2017-04-13 14:02:00 +03:00
|
|
|
|
2022-11-10 16:05:55 +03:00
|
|
|
if(ADD_E2E_TESTS)
|
2022-10-21 19:25:32 +03:00
|
|
|
nextcloud_add_test(E2eServerSetup)
|
2022-11-02 19:24:20 +03:00
|
|
|
nextcloud_add_test(E2eFileTransfer)
|
2022-11-10 16:05:55 +03:00
|
|
|
else()
|
|
|
|
nextcloud_build_test(E2eServerSetup)
|
|
|
|
nextcloud_build_test(E2eFileTransfer)
|
2022-10-21 19:25:32 +03:00
|
|
|
endif()
|
|
|
|
|
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)
|
2022-09-02 12:48:52 +03:00
|
|
|
target_sources(CfApiShellExtensionsIPCTest PRIVATE "${CMAKE_SOURCE_DIR}/src/libsync/vfs/cfapi/shellext/thumbnailprovideripc.cpp" "${CMAKE_SOURCE_DIR}/src/libsync/vfs/cfapi/shellext/customstateprovideripc.cpp" "${CMAKE_SOURCE_DIR}/src/libsync/vfs/cfapi/shellext/ipccommon.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
|
|
|
|
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)
|