Commit 788def27 authored by Jan Grulich's avatar Jan Grulich
Browse files

Simplify tests and make them optional

parent 71833088
...@@ -25,7 +25,6 @@ find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS ...@@ -25,7 +25,6 @@ find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Network Network
Quick Quick
Widgets Widgets
Test
) )
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
...@@ -96,6 +95,10 @@ add_subdirectory(kded) ...@@ -96,6 +95,10 @@ add_subdirectory(kded)
add_subdirectory(kcm) add_subdirectory(kcm)
add_subdirectory(libs) add_subdirectory(libs)
add_subdirectory(vpn) add_subdirectory(vpn)
add_subdirectory(tests)
# Enable unit testing
if (BUILD_TESTING)
add_subdirectory(tests)
endif ()
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} ) include_directories( ${CMAKE_SOURCE_DIR}/libs/editor )
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. )
########### next target ############### ########### next target ###############
include(ECMAddTests) include(ECMAddTests)
find_package(Qt5 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Test)
set_package_properties(Qt5Test PROPERTIES PURPOSE "Required for autotests")
ecm_add_test( ecm_add_test(
simpleipv6test.cpp simpleipv6test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../libs/editor/simpleipv6addressvalidator.cpp LINK_LIBRARIES Qt5::Test plasmanm_editor
TEST_NAME simpleipv6test
LINK_LIBRARIES Qt5::Test Qt5::Widgets
) )
ecm_add_test( ecm_add_test(
simpleipv4test.cpp simpleipv4test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../libs/editor/simpleipv4addressvalidator.cpp LINK_LIBRARIES Qt5::Test plasmanm_editor
TEST_NAME simpleipv4test
LINK_LIBRARIES Qt5::Test Qt5::Widgets
) )
ecm_add_test( ecm_add_test(
simpleiplisttest.cpp simpleiplisttest.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../libs/editor/simpleipv4addressvalidator.cpp LINK_LIBRARIES Qt5::Test plasmanm_editor
${CMAKE_CURRENT_SOURCE_DIR}/../libs/editor/simpleipv6addressvalidator.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../libs/editor/simpleiplistvalidator.cpp
TEST_NAME simpleiplisttest
LINK_LIBRARIES Qt5::Test Qt5::Widgets
) )
Supports Markdown
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