aboutsummaryrefslogtreecommitdiff
path: root/kde-modules/KDECMakeSettings.cmake
diff options
context:
space:
mode:
authorAleix Pol <aleixpol@kde.org>2016-08-24 04:01:44 +0200
committerAleix Pol <aleixpol@kde.org>2016-08-24 04:01:44 +0200
commit47d580f9de23ef1ef5e71f054ea893b23702e097 (patch)
tree7ded37520ce3ed3e378a5e3e3ef5680cf8287166 /kde-modules/KDECMakeSettings.cmake
parent1898940d5037600fe0c16bf635eefa6ee677a48a (diff)
downloadextra-cmake-modules-47d580f9de23ef1ef5e71f054ea893b23702e097.tar.gz
extra-cmake-modules-47d580f9de23ef1ef5e71f054ea893b23702e097.tar.bz2
Create a test that validates projects' appstream information
At the moment, we're validating it in build.kde.org, but I feel it will be easier for developers to test if we do so locally. This patch does it by seeing which *.appdata.xml files are being installed and validating them. This way we can keep it generic for all KDE projects. REVIEW: 128533
Diffstat (limited to 'kde-modules/KDECMakeSettings.cmake')
-rw-r--r--kde-modules/KDECMakeSettings.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/kde-modules/KDECMakeSettings.cmake b/kde-modules/KDECMakeSettings.cmake
index dd37e7f1..46fd10a8 100644
--- a/kde-modules/KDECMakeSettings.cmake
+++ b/kde-modules/KDECMakeSettings.cmake
@@ -130,6 +130,15 @@ endif()
################ Testing setup ####################################
+find_program(APPSTREAMCLI appstreamcli)
+function(appstreamtest)
+ if(APPSTREAMCLI AND NOT _done)
+ set(_done TRUE)
+ add_test(NAME appstreamtest COMMAND cmake -DAPPSTREAMCLI=${APPSTREAMCLI} -DINSTALL_FILES=${CMAKE_BINARY_DIR}/install_manifest.txt -P ${CMAKE_CURRENT_LIST_DIR}/appstreamtest.cmake)
+ else()
+ message(STATUS "Could not set up the appstream test. appstreamcli is missing.")
+ endif()
+endfunction()
if(NOT KDE_SKIP_TEST_SETTINGS)
@@ -143,6 +152,7 @@ if(NOT KDE_SKIP_TEST_SETTINGS)
option(BUILD_TESTING "Build the testing tree." ON)
if(BUILD_TESTING)
enable_testing()
+ appstreamtest()
endif ()
endif ()