Commit ce1a1f3e authored by Christophe Giboudeaux's avatar Christophe Giboudeaux
Browse files

Enable tests

parent eaa4c324
......@@ -27,7 +27,6 @@ ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX KPIMIDENTITIES
########### Find packages ###########
find_package(KF5 ${KF5_VERSION} CONFIG REQUIRED COMPONENTS CoreAddons KDE4Support KIO)
#find_package(Qt5 COMPONENTS Locale)
if(${CMAKE_SOURCE_DIR} STREQUAL ${KPimIdentities_SOURCE_DIR})
find_package(KF5PimUtils ${KF5_VERSION} CONFIG REQUIRED)
......@@ -36,7 +35,7 @@ endif()
########### Targets ###########
add_subdirectory(src)
#add_subdirectory(autotests)
add_subdirectory(autotests)
########### CMake Config Files ###########
set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/KF5PimIdentities")
......
include_directories(
${CMAKE_BINARY_DIR}/kpimidentities
${CMAKE_BINARY_DIR}/kpimtextedit
)
include(ECMMarkAsTest)
set(QT_REQUIRED_VERSION "5.2.0")
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Test)
set (identitytest_SRCS identitytest.cpp )
kde4_add_unit_test (identitytest TESTNAME kpimidentities-identitytest ${identitytest_SRCS})
########### next target ###############
target_link_libraries ( identitytest
${QT_QTTEST_LIBRARY}
${QT_QTCORE_LIBRARY}
${KDE4_KDECORE_LIBS}
kpimidentities
)
set(identitytest_SRCS identitytest.cpp)
set (signaturetest_SRCS signaturetest.cpp )
kde4_add_unit_test (signaturetest TESTNAME kpimidentities-signaturetest ${signaturetest_SRCS})
add_executable(identitytest ${identitytest_SRCS})
add_test(identitytest identitytest)
ecm_mark_as_test(identitytest)
target_link_libraries(identitytest KF5PimIdentities Qt5::Test)
target_link_libraries ( signaturetest
${QT_QTTEST_LIBRARY}
${KDE4_KDEUI_LIBS}
kpimidentities
kpimtextedit
)
########### next target ###############
set(signaturetest_SRCS signaturetest.cpp)
add_executable(signaturetest ${signaturetest_SRCS})
add_test(signaturetest signaturetest)
ecm_mark_as_test(signaturetest)
target_link_libraries(signaturetest KF5PimIdentities KF5::PimTextEdit Qt5::Test)
......@@ -18,8 +18,8 @@
*/
#include "qtest_kde.h"
#include "identitytest.h"
#include "../identitymanager.h"
#include "../identity.h"
#include "identitymanager.h"
#include "identity.h"
#include <KConfig>
#include <KConfigGroup>
......
......@@ -23,7 +23,7 @@
#include "qtest_kde.h"
#include "signaturetest.h"
#include "../signature.h"
#include "signature.h"
#include "kpimtextedit/textedit.h"
......
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