From 9d22f7b72412c7ccdd843de6e41028fe903f570a Mon Sep 17 00:00:00 2001 From: Alexander Lohnau Date: Tue, 18 May 2021 07:04:06 +0200 Subject: appstreamtest: Check if file exists before testing it In case one has uninstalled the project, but has made local changes that should be tested the test would fail. Instead check if the files exist before adding them to the list of files that will be tested. --- kde-modules/appstreamtest.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kde-modules/appstreamtest.cmake b/kde-modules/appstreamtest.cmake index 8361473b..6710fded 100644 --- a/kde-modules/appstreamtest.cmake +++ b/kde-modules/appstreamtest.cmake @@ -13,7 +13,11 @@ foreach(file IN LISTS out) continue() endif() - list(APPEND metadatafiles ${file}) + if(EXISTS ${file}) + list(APPEND metadatafiles ${file}) + else() + message(WARNING "Could not find ${file}") + endif() endforeach() if(metadatafiles) -- cgit v1.2.1