2014-04-26 17:33:58 +02:00
|
|
|
find_package(Qt5Test ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
|
|
|
|
set_package_properties(Qt5Test PROPERTIES PURPOSE "Required for tests")
|
|
|
|
|
2008-11-04 00:08:39 +01:00
|
|
|
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
2013-06-19 02:06:55 +02:00
|
|
|
include(ECMMarkAsTest)
|
|
|
|
|
2013-12-11 14:01:52 +01:00
|
|
|
find_package(KF5CoreAddons REQUIRED)
|
2013-03-05 14:43:14 +01:00
|
|
|
|
2013-06-19 02:06:55 +02:00
|
|
|
# add_definitions( -DKDESRCDIR=${CMAKE_CURRENT_SOURCE_DIR} )
|
|
|
|
|
2008-11-04 00:08:39 +01:00
|
|
|
MACRO(PLASMA_UNIT_TESTS)
|
|
|
|
FOREACH(_testname ${ARGN})
|
2013-06-19 02:06:55 +02:00
|
|
|
add_executable(${_testname} ${_testname}.cpp)
|
2014-04-16 18:00:11 +02:00
|
|
|
target_link_libraries(${_testname} Qt5::Qml Qt5::Test
|
|
|
|
KF5::Plasma KF5::PlasmaQuick
|
|
|
|
KF5::Archive KF5::CoreAddons
|
2013-12-11 14:01:52 +01:00
|
|
|
KF5::ConfigGui
|
|
|
|
KF5::I18n
|
2013-10-22 00:40:17 +02:00
|
|
|
KF5::KIOCore
|
2013-12-11 14:01:52 +01:00
|
|
|
KF5::Service)
|
2011-03-25 16:33:11 +01:00
|
|
|
if(QT_QTOPENGL_FOUND)
|
2013-10-22 00:40:17 +02:00
|
|
|
target_link_libraries(${_testname} Qt5::OpenGL)
|
2013-11-14 17:25:10 +01:00
|
|
|
endif()
|
2013-06-19 02:06:55 +02:00
|
|
|
add_test(plasma-${_testname} ${_testname})
|
|
|
|
ecm_mark_as_test(${_testname})
|
2008-11-04 00:08:39 +01:00
|
|
|
ENDFOREACH(_testname)
|
|
|
|
ENDMACRO(PLASMA_UNIT_TESTS)
|
|
|
|
|
|
|
|
PLASMA_UNIT_TESTS(
|
|
|
|
packagestructuretest
|
2014-04-16 18:00:11 +02:00
|
|
|
packageurlinterceptortest
|
2013-09-12 01:31:37 +02:00
|
|
|
pluginloadertest
|
2013-02-15 16:31:26 +01:00
|
|
|
# plasmoidpackagetest
|
2008-11-04 00:08:39 +01:00
|
|
|
)
|
2011-04-28 15:19:42 +02:00
|
|
|
|
2014-02-10 15:17:07 +01:00
|
|
|
add_executable(storagetest storagetest.cpp ../src/plasma/private/storage.cpp ../src/plasma/private/storagethread.cpp)
|
2014-03-31 18:37:28 +02:00
|
|
|
target_link_libraries(storagetest Qt5::Test Qt5::Sql KF5::KIOCore KF5::Plasma KF5::CoreAddons )
|
2013-06-19 02:06:55 +02:00
|
|
|
add_test(plasma-storagetest storagetest)
|
2013-11-13 07:34:22 +01:00
|
|
|
ecm_mark_as_test(storagetest)
|
2013-06-19 02:06:55 +02:00
|
|
|
|
2014-04-16 18:00:11 +02:00
|
|
|
add_executable(sortfiltermodeltest
|
|
|
|
sortfiltermodeltest.cpp
|
|
|
|
../src/plasma/dataengineconsumer.cpp
|
|
|
|
../src/declarativeimports/core/datamodel.cpp
|
|
|
|
../src/declarativeimports/core/datasource.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(sortfiltermodeltest
|
|
|
|
KF5::Plasma
|
|
|
|
Qt5::Gui
|
|
|
|
Qt5::Test
|
|
|
|
KF5::I18n
|
|
|
|
KF5::Service
|
|
|
|
Qt5::Qml
|
|
|
|
)
|
|
|
|
|
|
|
|
add_test(plasma-sortfiltermodeltest sortfiltermodeltest)
|
|
|
|
ecm_mark_as_test(sortfiltermodeltest)
|
|
|
|
|
2011-04-28 15:19:42 +02:00
|
|
|
if(QT_QTOPENGL_FOUND)
|
2013-10-22 00:40:17 +02:00
|
|
|
target_link_libraries(storagetest Qt5::OpenGL)
|
2013-11-14 17:25:10 +01:00
|
|
|
endif()
|