summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-08-17 13:18:00 +0200
committerMontel Laurent <[email protected]>2017-08-17 13:18:52 +0200
commitaa04854247a8353bce6314caad0096d52448e2a2 (patch)
treeada4457494a331658816820923091f91b4c577ac
parenta85e4fe5e17eb74a43d4e0480c30f7167fc478d9 (diff)
Make it executable without install it
-rw-r--r--CMakeLists.txt12
-rw-r--r--agents/migration/autotests/CMakeLists.txt2
-rw-r--r--plugins/autotests/CMakeLists.txt2
-rw-r--r--resources/CMakeLists.txt2
-rw-r--r--resources/folderarchivesettings/autotests/CMakeLists.txt2
-rw-r--r--resources/imap/autotests/CMakeLists.txt2
-rw-r--r--resources/maildir/libmaildir/autotests/CMakeLists.txt2
-rw-r--r--resources/mbox/autotests/CMakeLists.txt2
-rw-r--r--resources/mixedmaildir/autotests/CMakeLists.txt26
-rw-r--r--resources/mixedmaildir/kmindexreader/autotests/CMakeLists.txt2
-rw-r--r--resources/shared/filestore/autotests/CMakeLists.txt2
-rw-r--r--resources/shared/singlefileresource/autotests/CMakeLists.txt2
12 files changed, 33 insertions, 25 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 28d541d..de15e3c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,8 +46,16 @@ set(KDEPIM_RUNTIME_VERSION "${KDEPIM_RUNTIME_VERSION_NUMBER}${KDEPIM_RUNTIME_DEV
configure_file(kdepim-runtime-version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/kdepim-runtime-version.h @ONLY)
set(KF5_VERSION "5.37.0")
-find_package(ECM ${KF5_VERSION} REQUIRED NO_MODULE)
-set(CMAKE_MODULE_PATH ${kdepim-runtime_SOURCE_DIR}/cmake ${ECM_MODULE_PATH})
+option(RUN_UNINSTALL "test run uninstalled apps (experimental)" FALSE)
+
+set(ECM_VERSION ${KF5_VERSION})
+# ECM setup
+if (RUN_UNINSTALL)
+ set(ECM_VERSION "5.38.0")
+endif()
+
+find_package(ECM ${ECM_VERSION} CONFIG REQUIRED)
+set(CMAKE_MODULE_PATH ${kdepim-runtime_SOURCE_DIR}/cmake/ ${ECM_MODULE_PATH})
include(CMakePackageConfigHelpers)
include(ECMSetupVersion)
diff --git a/agents/migration/autotests/CMakeLists.txt b/agents/migration/autotests/CMakeLists.txt
index 7bda437..c0f5bba 100644
--- a/agents/migration/autotests/CMakeLists.txt
+++ b/agents/migration/autotests/CMakeLists.txt
@@ -9,4 +9,4 @@ target_link_libraries(schedulertest
KF5::AkonadiCore
Qt5::Test
)
-add_test(schedulertest schedulertest)
+add_test(NAME schedulertest COMMAND schedulertest)
diff --git a/plugins/autotests/CMakeLists.txt b/plugins/autotests/CMakeLists.txt
index 09e5f70..53e4ba2 100644
--- a/plugins/autotests/CMakeLists.txt
+++ b/plugins/autotests/CMakeLists.txt
@@ -17,7 +17,7 @@ macro(add_akonadiplugin_test _source _libs _additionalSources _target_included_d
get_filename_component(_name ${_source} NAME_WE)
add_executable( ${_name} ${srcs} )
- add_test( ${_name} ${_name} )
+ add_test(NAME ${_name} COMMAND ${_name} )
ecm_mark_as_test(akonadiplugin-${_name})
if(NOT ${_target_included_directories} STREQUAL "")
target_include_directories(${_name} PRIVATE "$<BUILD_INTERFACE:$<TARGET_PROPERTY:${_target_included_directories},INCLUDE_DIRECTORIES>>")
diff --git a/resources/CMakeLists.txt b/resources/CMakeLists.txt
index 16f9956..b4bc62f 100644
--- a/resources/CMakeLists.txt
+++ b/resources/CMakeLists.txt
@@ -34,7 +34,7 @@ macro( akonadi_add_resourcetest _testname _script )
endif ()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${_script} ${CMAKE_CURRENT_BINARY_DIR}/${_script} COPYONLY)
if (KDEPIM_RUN_ISOLATED_TESTS)
- add_test( akonadi-mysql-db-${_testname} akonaditest -c ${kdepim-runtime_SOURCE_DIR}/resourcetester/tests/unittestenv/config-mysql-db.xml ${_resourcetester} -c ${CMAKE_CURRENT_BINARY_DIR}/${_script} )
+ add_test( NAME akonadi-mysql-db-${_testname} COMMAND akonaditest -c ${kdepim-runtime_SOURCE_DIR}/resourcetester/tests/unittestenv/config-mysql-db.xml ${_resourcetester} -c ${CMAKE_CURRENT_BINARY_DIR}/${_script} )
endif ()
endmacro( akonadi_add_resourcetest )
diff --git a/resources/folderarchivesettings/autotests/CMakeLists.txt b/resources/folderarchivesettings/autotests/CMakeLists.txt
index 99ee61e..5858e27 100644
--- a/resources/folderarchivesettings/autotests/CMakeLists.txt
+++ b/resources/folderarchivesettings/autotests/CMakeLists.txt
@@ -4,7 +4,7 @@ macro( folderarchive_kmail _source )
set( _test ${_source} ../folderarchiveaccountinfo.cpp )
get_filename_component( _name ${_source} NAME_WE )
add_executable( ${_name} ${_test} )
- add_test( ${_name} ${_name} )
+ add_test(NAME ${_name} COMMAND ${_name} )
ecm_mark_as_test(folderararchive-${_name})
target_link_libraries( ${_name} Qt5::Test Qt5::Core KF5::AkonadiCore KF5::ConfigCore)
diff --git a/resources/imap/autotests/CMakeLists.txt b/resources/imap/autotests/CMakeLists.txt
index 70dca0e..1233f55 100644
--- a/resources/imap/autotests/CMakeLists.txt
+++ b/resources/imap/autotests/CMakeLists.txt
@@ -20,7 +20,7 @@ if(KIMAPTEST_INCLUDE_DIR AND KIMAPTEST_LIBRARY)
FOREACH(_testname ${ARGN})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_BINARY_DIR}/..)
add_executable( ${_testname} ${_testname}.cpp dummypasswordrequester.cpp dummyresourcestate.cpp imaptestbase.cpp )
- add_test( ${_testname} ${_testname} )
+ add_test(NAME ${_testname} COMMAND ${_testname} )
ecm_mark_as_test(imap-${_testname})
target_link_libraries(${_testname}
diff --git a/resources/maildir/libmaildir/autotests/CMakeLists.txt b/resources/maildir/libmaildir/autotests/CMakeLists.txt
index 90e1ec9..7c4a64c 100644
--- a/resources/maildir/libmaildir/autotests/CMakeLists.txt
+++ b/resources/maildir/libmaildir/autotests/CMakeLists.txt
@@ -12,7 +12,7 @@ set(testmaildir_SRCS testmaildir.cpp )
add_executable( testmaildir ${testmaildir_SRCS} )
-add_test( testmaildir testmaildir )
+add_test(NAME testmaildir COMMAND testmaildir )
ecm_mark_as_test(maildir-testmaildir)
target_link_libraries(testmaildir Qt5::Test KF5::AkonadiMime maildir)
diff --git a/resources/mbox/autotests/CMakeLists.txt b/resources/mbox/autotests/CMakeLists.txt
index 88969ee..53ce79d 100644
--- a/resources/mbox/autotests/CMakeLists.txt
+++ b/resources/mbox/autotests/CMakeLists.txt
@@ -1,7 +1,7 @@
set( mbox_deleteitemsattributetest_source deleteitemsattributetest.cpp ../deleteditemsattribute.cpp)
add_executable( deleteitemsattributetest ${mbox_deleteitemsattributetest_source})
-add_test(deleteitemsattributetest deleteitemsattributetest)
+add_test(NAME deleteitemsattributetest COMMAND deleteitemsattributetest)
ecm_mark_as_test(deleteitemsattributetest)
target_link_libraries( deleteitemsattributetest Qt5::Test Qt5::Gui KF5::AkonadiCore KF5::Mbox)
diff --git a/resources/mixedmaildir/autotests/CMakeLists.txt b/resources/mixedmaildir/autotests/CMakeLists.txt
index eff9a0b..a00bb8b 100644
--- a/resources/mixedmaildir/autotests/CMakeLists.txt
+++ b/resources/mixedmaildir/autotests/CMakeLists.txt
@@ -29,7 +29,7 @@ set( testdata_SRCS
remove_definitions(-DQT_NO_CAST_FROM_ASCII)
add_executable(testdatatest testdatatest.cpp ${testdata_SRCS})
-add_test(testdatatest testdatatest)
+add_test(NAME testdatatest COMMAND testdatatest)
ecm_mark_as_test(mixedmaildir-testdatatest)
target_link_libraries(
@@ -53,7 +53,7 @@ set( common_link_libraries
# test for overwritten methods
add_executable(templatemethodstest ../mixedmaildirstore.cpp templatemethodstest.cpp ../mixedmaildir_debug.cpp ../mixedmaildirresource_debug.cpp)
-add_test(templatemethodstest templatemethodstest)
+add_test(NAME templatemethodstest COMMAND templatemethodstest)
ecm_mark_as_test(mixedmaildir-templatemethodtest)
@@ -64,7 +64,7 @@ target_link_libraries(
# test for collection creation handling
add_executable(collectioncreatetest ../mixedmaildirstore.cpp collectioncreatetest.cpp ../mixedmaildir_debug.cpp ../mixedmaildirresource_debug.cpp)
-add_test(collectioncreatetest collectioncreatetest)
+add_test(NAME collectioncreatetest COMMAND collectioncreatetest)
ecm_mark_as_test(mixedmaildir-collectioncreatetest)
@@ -75,7 +75,7 @@ target_link_libraries(
# test for collection deletion handling
add_executable(collectiondeletetest ../mixedmaildirstore.cpp collectiondeletetest.cpp ../mixedmaildir_debug.cpp ../mixedmaildirresource_debug.cpp)
-add_test(collectiondeletetest collectiondeletetest)
+add_test(NAME collectiondeletetest COMMAND collectiondeletetest)
ecm_mark_as_test(mixedmaildir-collectiondeletetest)
target_link_libraries(
@@ -85,7 +85,7 @@ target_link_libraries(
# test for collection fetching handling
add_executable( collectionfetchtest ../mixedmaildirstore.cpp collectionfetchtest.cpp ../mixedmaildir_debug.cpp ../mixedmaildirresource_debug.cpp)
-add_test(collectionfetchtest collectionfetchtest)
+add_test(NAME collectionfetchtest COMMAND collectionfetchtest)
ecm_mark_as_test(mixedmaildir-collectionfetchtest)
@@ -99,7 +99,7 @@ add_executable( collectionmodifytest ../mixedmaildirstore.cpp
collectionmodifytest.cpp ../mixedmaildir_debug.cpp ../mixedmaildirresource_debug.cpp
${testdata_SRCS}
)
-add_test(collectionmodifytest collectionmodifytest)
+add_test(NAME collectionmodifytest COMMAND collectionmodifytest)
ecm_mark_as_test(mixedmaildir-collectionmodifytest)
@@ -113,7 +113,7 @@ add_executable( collectionmovetest ../mixedmaildirstore.cpp ../mixedmaildir_deb
collectionmovetest.cpp ../mixedmaildirresource_debug.cpp
${testdata_SRCS}
)
-add_test(collectionmovetest collectionmovetest)
+add_test(NAME collectionmovetest COMMAND collectionmovetest)
ecm_mark_as_test(mixedmaildir-collectionmovetest)
target_link_libraries(
@@ -126,7 +126,7 @@ add_executable(itemcreatetest ../mixedmaildirstore.cpp ../mixedmaildir_debug.c
itemcreatetest.cpp
${testdata_SRCS}
)
-add_test(itemcreatetest itemcreatetest)
+add_test(NAME itemcreatetest COMMAND itemcreatetest)
ecm_mark_as_test(mixedmaildir-itemcreatetest)
@@ -140,7 +140,7 @@ add_executable(itemdeletetest ../mixedmaildirstore.cpp
itemdeletetest.cpp ../mixedmaildirresource_debug.cpp
${testdata_SRCS}
)
-add_test(itemdeletetest itemdeletetest)
+add_test(NAME itemdeletetest COMMAND itemdeletetest)
ecm_mark_as_test(mixedmaildir-itemdeletetest)
@@ -155,7 +155,7 @@ add_executable(itemfetchtest ../mixedmaildirstore.cpp ../mixedmaildirresource_
itemfetchtest.cpp
${testdata_SRCS}
)
-add_test(itemfetchtest itemfetchtest)
+add_test(NAME itemfetchtest COMMAND itemfetchtest)
ecm_mark_as_test(mixedmaildir-itemfetchtest)
target_link_libraries(
@@ -169,7 +169,7 @@ add_executable(itemmodifytest ../mixedmaildirstore.cpp ../mixedmaildirresource
itemmodifytest.cpp
${testdata_SRCS}
)
-add_test(itemmodifytest itemmodifytest)
+add_test(NAME itemmodifytest COMMAND itemmodifytest)
ecm_mark_as_test( mixedmaildir-itemmodifytest)
target_link_libraries(
@@ -182,7 +182,7 @@ add_executable(itemmovetest ../mixedmaildirstore.cpp ../mixedmaildirresource_de
itemmovetest.cpp
${testdata_SRCS}
)
-add_test(itemmovetest itemmovetest)
+add_test(NAME itemmovetest COMMAND itemmovetest)
ecm_mark_as_test(mixedmaildir-itemmovetest)
@@ -196,7 +196,7 @@ add_executable(storecompacttest ../mixedmaildirstore.cpp ../mixedmaildirresour
storecompacttest.cpp
${testdata_SRCS}
)
-add_test(storecompacttest storecompacttest)
+add_test(NAME storecompacttest COMMAND storecompacttest)
ecm_mark_as_test(mixedmaildir-storecompacttest)
diff --git a/resources/mixedmaildir/kmindexreader/autotests/CMakeLists.txt b/resources/mixedmaildir/kmindexreader/autotests/CMakeLists.txt
index 4153b2c..715f01a 100644
--- a/resources/mixedmaildir/kmindexreader/autotests/CMakeLists.txt
+++ b/resources/mixedmaildir/kmindexreader/autotests/CMakeLists.txt
@@ -5,7 +5,7 @@ set( testidxreader_SRCS
)
remove_definitions(-DQT_NO_CAST_FROM_ASCII)
add_executable( testidxreader ${testidxreader_SRCS} )
-add_test( testidxreader testidxreader )
+add_test(NAME testidxreader COMMAND testidxreader )
ecm_mark_as_test(testidxreader)
target_link_libraries( testidxreader Qt5::Test kmindexreader KF5::AkonadiMime )
diff --git a/resources/shared/filestore/autotests/CMakeLists.txt b/resources/shared/filestore/autotests/CMakeLists.txt
index 590a171..8396fb6 100644
--- a/resources/shared/filestore/autotests/CMakeLists.txt
+++ b/resources/shared/filestore/autotests/CMakeLists.txt
@@ -18,7 +18,7 @@ include_directories(
)
add_executable(abstractlocalstoretest abstractlocalstoretest.cpp)
-add_test(abstractlocalstoretest abstractlocalstoretest)
+add_test(NAME abstractlocalstoretest COMMAND abstractlocalstoretest)
ecm_mark_as_test(abstractlocalstoretest)
target_link_libraries(
diff --git a/resources/shared/singlefileresource/autotests/CMakeLists.txt b/resources/shared/singlefileresource/autotests/CMakeLists.txt
index a3df022..1d509f3 100644
--- a/resources/shared/singlefileresource/autotests/CMakeLists.txt
+++ b/resources/shared/singlefileresource/autotests/CMakeLists.txt
@@ -6,7 +6,7 @@ macro(_add_test _source)
set(_test ${_source})
get_filename_component(_name ${_source} NAME_WE)
add_executable( ${_name} ${_test} )
- add_test( ${_name} ${_name} )
+ add_test( NAME ${_name} COMMAND ${_name} )
ecm_mark_as_test(singlefileresource-${_name})
target_link_libraries(${_name} Qt5::Test
KF5::AkonadiCore KF5::IMAP akonadi-singlefileresource)