summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-08-16 13:57:34 +0200
committerMontel Laurent <[email protected]>2017-08-16 13:57:34 +0200
commitc91441ab80da4e4db10ef0fa78f4297153779e2a (patch)
treefb9f7ab5051fa6e3e56ff5dfe8a4058ba2732fb6
parentb664bfafa853a78a773a18f822abf3d7858e0412 (diff)
Allow to run test without install it
-rw-r--r--CMakeLists.txt10
-rw-r--r--src/ksieveui/editor/autotests/CMakeLists.txt6
-rw-r--r--src/ksieveui/editor/webengine/autotests/CMakeLists.txt2
-rw-r--r--src/ksieveui/managescriptsjob/autotests/CMakeLists.txt2
-rw-r--r--src/ksieveui/sieveimapinstance/autotests/CMakeLists.txt2
-rw-r--r--src/ksieveui/sievescriptdebugger/autotests/CMakeLists.txt2
-rw-r--r--src/ksieveui/util/autotests/CMakeLists.txt2
-rw-r--r--src/ksieveui/vacation/autotests/CMakeLists.txt2
-rw-r--r--src/ksieveui/widgets/autotests/CMakeLists.txt2
9 files changed, 19 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f648398..fc1e881 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,7 +4,15 @@ set(PIM_VERSION "5.6.42")
project(libksieve VERSION ${PIM_VERSION})
set(KF5_VERSION "5.37.0")
-find_package(ECM ${KF5_VERSION} CONFIG REQUIRED)
+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 ${libksieve_SOURCE_DIR}/cmake ${ECM_MODULE_PATH})
set(LIBRARY_NAMELINK)
include(GenerateExportHeader)
diff --git a/src/ksieveui/editor/autotests/CMakeLists.txt b/src/ksieveui/editor/autotests/CMakeLists.txt
index a7190cb..960f7d6 100644
--- a/src/ksieveui/editor/autotests/CMakeLists.txt
+++ b/src/ksieveui/editor/autotests/CMakeLists.txt
@@ -1,7 +1,7 @@
set( libksieveui_sieveeditormenubartest_source sieveeditormenubartest.cpp ../sieveeditormenubar.cpp
)
add_executable( sieveeditormenubartest ${libksieveui_sieveeditormenubartest_source})
-add_test(sieveeditormenubartest sieveeditormenubartest)
+add_test(NAME sieveeditormenubartest COMMAND sieveeditormenubartest)
ecm_mark_as_test(sieveeditormenubartest)
target_link_libraries( sieveeditormenubartest KF5::KSieveUi KF5::KSieve Qt5::Test Qt5::Gui Qt5::Widgets KF5::Completion KF5::IconThemes KF5::PimCommon KF5::ConfigWidgets KF5::I18n KF5::PimTextEdit Qt5::PrintSupport Qt5::WebEngineWidgets KF5::MailTransport)
set_property(TARGET sieveeditormenubartest PROPERTY INCLUDE_DIRECTORIES ${CMAKE_SOURCE_DIR}/src/ksieveui/ ${CMAKE_SOURCE_DIR}/src/ksieveui/editor/webengine/ ${CMAKE_SOURCE_DIR}/src/ksieveui/editor/webengine/findbar ${CMAKE_BINARY_DIR}/src/ksieveui/)
@@ -10,13 +10,13 @@ set_property(TARGET sieveeditormenubartest PROPERTY INCLUDE_DIRECTORIES ${CMAKE_
set( libksieveui_sievetextedittest_source sievetextedittest.cpp )
add_executable( sievetextedittest ${libksieveui_sievetextedittest_source})
-add_test(sievetextedittest sievetextedittest)
+add_test(NAME sievetextedittest COMMAND sievetextedittest)
ecm_mark_as_test(sievetextedittest)
target_link_libraries( sievetextedittest Qt5::Test Qt5::Gui KF5::KSieveUi KF5::PimCommon KF5::PimTextEdit Qt5::PrintSupport)
set( libksieveui_sievetexteditwidgettest_source sievetexteditwidgettest.cpp )
add_executable( sievetexteditwidgettest ${libksieveui_sievetexteditwidgettest_source})
-add_test(sievetexteditwidgettest sievetexteditwidgettest)
+add_test(NAME sievetexteditwidgettest COMMAND sievetexteditwidgettest)
ecm_mark_as_test(sievetexteditwidgettest)
target_link_libraries( sievetexteditwidgettest Qt5::Test Qt5::Gui KF5::KSieveUi KF5::PimCommon KF5::PimTextEdit Qt5::PrintSupport)
diff --git a/src/ksieveui/editor/webengine/autotests/CMakeLists.txt b/src/ksieveui/editor/webengine/autotests/CMakeLists.txt
index 84b4c1b..485cf0d 100644
--- a/src/ksieveui/editor/webengine/autotests/CMakeLists.txt
+++ b/src/ksieveui/editor/webengine/autotests/CMakeLists.txt
@@ -3,7 +3,7 @@ set( libksieveui_sieveeditorhelphtmlwidgettest_source sieveeditorhelphtmlwidgett
../sieveeditorloadprogressindicator.cpp
)
add_executable( sieveeditorhelphtmlwidgettest ${libksieveui_sieveeditorhelphtmlwidgettest_source})
-add_test(sieveeditorhelphtmlwidgettest sieveeditorhelphtmlwidgettest)
+add_test(NAME sieveeditorhelphtmlwidgettest COMMAND sieveeditorhelphtmlwidgettest)
ecm_mark_as_test(sieveeditorhelphtmlwidgettest)
target_link_libraries( sieveeditorhelphtmlwidgettest
Qt5::Test
diff --git a/src/ksieveui/managescriptsjob/autotests/CMakeLists.txt b/src/ksieveui/managescriptsjob/autotests/CMakeLists.txt
index baa196f..97c3980 100644
--- a/src/ksieveui/managescriptsjob/autotests/CMakeLists.txt
+++ b/src/ksieveui/managescriptsjob/autotests/CMakeLists.txt
@@ -4,7 +4,7 @@ macro( add_managesievejob_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(managejob-${_name})
target_link_libraries( ${_name} KF5::KSieveUi Qt5::Test )
endmacro()
diff --git a/src/ksieveui/sieveimapinstance/autotests/CMakeLists.txt b/src/ksieveui/sieveimapinstance/autotests/CMakeLists.txt
index 6fb3976..8ef7e78 100644
--- a/src/ksieveui/sieveimapinstance/autotests/CMakeLists.txt
+++ b/src/ksieveui/sieveimapinstance/autotests/CMakeLists.txt
@@ -4,7 +4,7 @@ macro( add_sieveimapinstance_test _source _additionalsource)
set( _test ${_source} ${_additionalsource})
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(sieveimapinstancetest-${_name})
target_link_libraries( ${_name} KF5::KSieveUi Qt5::Test)
endmacro()
diff --git a/src/ksieveui/sievescriptdebugger/autotests/CMakeLists.txt b/src/ksieveui/sievescriptdebugger/autotests/CMakeLists.txt
index 935a09b..bc8cc8e 100644
--- a/src/ksieveui/sievescriptdebugger/autotests/CMakeLists.txt
+++ b/src/ksieveui/sievescriptdebugger/autotests/CMakeLists.txt
@@ -4,7 +4,7 @@ macro( add_sievescriptdebugger_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(sievescriptdebugger-${_name})
target_link_libraries( ${_name} KF5::KSieveUi Qt5::Test KF5::Completion KF5::KIOWidgets KF5::PimTextEdit)
endmacro()
diff --git a/src/ksieveui/util/autotests/CMakeLists.txt b/src/ksieveui/util/autotests/CMakeLists.txt
index c302f26..82cb0a1 100644
--- a/src/ksieveui/util/autotests/CMakeLists.txt
+++ b/src/ksieveui/util/autotests/CMakeLists.txt
@@ -2,7 +2,7 @@ macro(add_sieveutil_test _source _additionalsource)
set( _test ${_source} ${_additionalsource})
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(sievescriptdebugger-${_name})
target_link_libraries( ${_name} KF5::KSieveUi Qt5::Test KF5::MailTransport KF5::I18n)
endmacro()
diff --git a/src/ksieveui/vacation/autotests/CMakeLists.txt b/src/ksieveui/vacation/autotests/CMakeLists.txt
index 674ba63..2dd2c3c 100644
--- a/src/ksieveui/vacation/autotests/CMakeLists.txt
+++ b/src/ksieveui/vacation/autotests/CMakeLists.txt
@@ -14,7 +14,7 @@ macro( add_vacation_test _source )
get_filename_component(_name ${_source}test NAME_WE)
ecm_qt_declare_logging_category(_test HEADER libksieve_debug.h IDENTIFIER LIBKSIEVE_LOG CATEGORY_NAME org.kde.pim.libksieve)
add_executable(${_name} ${_test})
- add_test(vacation-${_name} ${_name})
+ add_test(NAME vacation-${_name} COMMAND ${_name})
ecm_mark_as_test(vacation-${_name})
add_definitions(-DVACATIONTESTDATADIR="${CMAKE_CURRENT_SOURCE_DIR}/data/")
target_link_libraries(${_name}
diff --git a/src/ksieveui/widgets/autotests/CMakeLists.txt b/src/ksieveui/widgets/autotests/CMakeLists.txt
index fe49243..fd2556c 100644
--- a/src/ksieveui/widgets/autotests/CMakeLists.txt
+++ b/src/ksieveui/widgets/autotests/CMakeLists.txt
@@ -2,7 +2,7 @@ macro(add_autocreatescriptswidget_test _source _additionalsource)
set( _test ${_source} ${_additionalsource})
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(sievescriptdebugger-${_name})
target_link_libraries( ${_name} KF5::KSieveUi Qt5::Test)
endmacro()