Move stray tests to the root directory to be more like
other frameworks. REVIEW: 117599
This commit is contained in:
parent
82c46aa795
commit
d488420dcb
@ -39,7 +39,7 @@ endif()
|
|||||||
set (QT_MIN_VERSION "5.2.0")
|
set (QT_MIN_VERSION "5.2.0")
|
||||||
set(KF5_VERSION "4.98.0")
|
set(KF5_VERSION "4.98.0")
|
||||||
|
|
||||||
find_package(Qt5 REQUIRED NO_MODULE COMPONENTS Quick Sql Qml Widgets Svg Script Test)
|
find_package(Qt5 REQUIRED NO_MODULE COMPONENTS Quick Sql Qml Widgets Svg Script)
|
||||||
|
|
||||||
find_package(KF5Activities ${KF5_VERSION} REQUIRED)
|
find_package(KF5Activities ${KF5_VERSION} REQUIRED)
|
||||||
find_package(KF5Archive ${KF5_VERSION} REQUIRED)
|
find_package(KF5Archive ${KF5_VERSION} REQUIRED)
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
find_package(Qt5Test 5.2.0 REQUIRED NO_MODULE)
|
||||||
|
set_package_properties(Qt5Test PROPERTIES PURPOSE "Required for tests")
|
||||||
|
|
||||||
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
|
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
include(ECMMarkAsTest)
|
include(ECMMarkAsTest)
|
||||||
@ -9,8 +12,9 @@ find_package(KF5CoreAddons REQUIRED)
|
|||||||
MACRO(PLASMA_UNIT_TESTS)
|
MACRO(PLASMA_UNIT_TESTS)
|
||||||
FOREACH(_testname ${ARGN})
|
FOREACH(_testname ${ARGN})
|
||||||
add_executable(${_testname} ${_testname}.cpp)
|
add_executable(${_testname} ${_testname}.cpp)
|
||||||
target_link_libraries(${_testname} Qt5::Test
|
target_link_libraries(${_testname} Qt5::Qml Qt5::Test
|
||||||
KF5::Plasma KF5::Archive KF5::CoreAddons
|
KF5::Plasma KF5::PlasmaQuick
|
||||||
|
KF5::Archive KF5::CoreAddons
|
||||||
KF5::ConfigGui
|
KF5::ConfigGui
|
||||||
KF5::I18n
|
KF5::I18n
|
||||||
KF5::KIOCore
|
KF5::KIOCore
|
||||||
@ -26,6 +30,7 @@ ENDMACRO(PLASMA_UNIT_TESTS)
|
|||||||
PLASMA_UNIT_TESTS(
|
PLASMA_UNIT_TESTS(
|
||||||
configloadertest
|
configloadertest
|
||||||
packagestructuretest
|
packagestructuretest
|
||||||
|
packageurlinterceptortest
|
||||||
pluginloadertest
|
pluginloadertest
|
||||||
# plasmoidpackagetest
|
# plasmoidpackagetest
|
||||||
)
|
)
|
||||||
@ -35,6 +40,25 @@ target_link_libraries(storagetest Qt5::Test Qt5::Sql KF5::KIOCore KF5::Plasma KF
|
|||||||
add_test(plasma-storagetest storagetest)
|
add_test(plasma-storagetest storagetest)
|
||||||
ecm_mark_as_test(storagetest)
|
ecm_mark_as_test(storagetest)
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
if(QT_QTOPENGL_FOUND)
|
if(QT_QTOPENGL_FOUND)
|
||||||
target_link_libraries(storagetest Qt5::OpenGL)
|
target_link_libraries(storagetest Qt5::OpenGL)
|
||||||
endif()
|
endif()
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#include "packageurlinterceptortest.h"
|
#include "packageurlinterceptortest.h"
|
||||||
|
|
||||||
#include <packageurlinterceptor.h>
|
#include <plasmaquick/packageurlinterceptor.h>
|
||||||
|
|
||||||
#include <qtest.h>
|
#include <qtest.h>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
#include <sortfiltermodeltest.h>
|
#include <sortfiltermodeltest.h>
|
||||||
|
|
||||||
#include <datamodel.h>
|
#include <declarativeimports/core/datamodel.h>
|
||||||
|
|
||||||
// KDE
|
// KDE
|
||||||
|
|
@ -75,5 +75,3 @@ install(TARGETS corebindingsplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/plasma
|
|||||||
install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/plasma/core)
|
install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/plasma/core)
|
||||||
|
|
||||||
install(FILES private/DefaultToolTip.qml DESTINATION ${QML_INSTALL_DIR}/org/kde/plasma/core/private)
|
install(FILES private/DefaultToolTip.qml DESTINATION ${QML_INSTALL_DIR}/org/kde/plasma/core/private)
|
||||||
|
|
||||||
add_subdirectory(tests)
|
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
INCLUDE_DIRECTORIES(
|
|
||||||
${corebindings_SOURCE_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
include(ECMMarkAsTest)
|
|
||||||
|
|
||||||
add_executable(sortfiltermodeltest
|
|
||||||
sortfiltermodeltest.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../../../plasma/dataengineconsumer.cpp
|
|
||||||
${corebindings_SOURCE_DIR}/datamodel.cpp
|
|
||||||
${corebindings_SOURCE_DIR}/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)
|
|
@ -118,5 +118,3 @@ install(FILES
|
|||||||
)
|
)
|
||||||
|
|
||||||
install(EXPORT KF5PlasmaQuickTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5PlasmaQuickTargets.cmake NAMESPACE KF5:: )
|
install(EXPORT KF5PlasmaQuickTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5PlasmaQuickTargets.cmake NAMESPACE KF5:: )
|
||||||
|
|
||||||
add_subdirectory(autotests)
|
|
||||||
|
@ -1,35 +0,0 @@
|
|||||||
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
|
|
||||||
|
|
||||||
include(ECMMarkAsTest)
|
|
||||||
|
|
||||||
find_package(KF5CoreAddons REQUIRED)
|
|
||||||
|
|
||||||
# add_definitions( -DKDESRCDIR=${CMAKE_CURRENT_SOURCE_DIR} )
|
|
||||||
|
|
||||||
MACRO(PLASMA_UNIT_TESTS)
|
|
||||||
FOREACH(_testname ${ARGN})
|
|
||||||
add_executable(${_testname} ${_testname}.cpp)
|
|
||||||
target_link_libraries(${_testname}
|
|
||||||
Qt5::Test
|
|
||||||
Qt5::Qml
|
|
||||||
KF5::Plasma
|
|
||||||
KF5::Archive KF5::CoreAddons
|
|
||||||
KF5::ConfigGui
|
|
||||||
KF5::I18n
|
|
||||||
KF5::KIOCore
|
|
||||||
KF5::Service
|
|
||||||
KF5::PlasmaQuick
|
|
||||||
)
|
|
||||||
if(QT_QTOPENGL_FOUND)
|
|
||||||
target_link_libraries(${_testname} Qt5::OpenGL)
|
|
||||||
endif()
|
|
||||||
add_test(plasma-${_testname} ${_testname})
|
|
||||||
ecm_mark_as_test(${_testname})
|
|
||||||
ENDFOREACH(_testname)
|
|
||||||
ENDMACRO(PLASMA_UNIT_TESTS)
|
|
||||||
|
|
||||||
PLASMA_UNIT_TESTS(
|
|
||||||
packageurlinterceptortest
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user