Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit aa048542 authored by Laurent Montel's avatar Laurent Montel 😁

Make it executable without install it

parent a85e4fe5
......@@ -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)
......
......@@ -9,4 +9,4 @@ target_link_libraries(schedulertest
KF5::AkonadiCore
Qt5::Test
)
add_test(schedulertest schedulertest)
add_test(NAME schedulertest COMMAND schedulertest)
......@@ -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>>")
......
......@@ -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 )
......
......@@ -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)
......
......@@ -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}
......
......@@ -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)
......
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)
......@@ -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)
......
......@@ -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 )
......@@ -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(
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment