34 lines
1.3 KiB
Diff
34 lines
1.3 KiB
Diff
From 35f56d486c7f6c4b110a27476e9114f3e19c0fae Mon Sep 17 00:00:00 2001
|
|
From: Martchus <martchus@gmx.net>
|
|
Date: Thu, 30 Nov 2023 19:44:08 +0100
|
|
Subject: [PATCH] Fix enabling AppStream tests
|
|
|
|
---
|
|
cmake/modules/AppUtilities.cmake | 10 ++++++----
|
|
1 file changed, 6 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/cmake/modules/AppUtilities.cmake b/cmake/modules/AppUtilities.cmake
|
|
index 2272431..bd93d92 100644
|
|
--- a/cmake/modules/AppUtilities.cmake
|
|
+++ b/cmake/modules/AppUtilities.cmake
|
|
@@ -86,10 +86,12 @@ function (add_appstream_file)
|
|
set(APPSTREAM_TESTS_ENABLED_DEFAULT ON)
|
|
endif ()
|
|
option(APPSTREAM_TESTS_ENABLED "enables tests for checking whether AppStream files" "${APPSTREAM_TESTS_ENABLED_DEFAULT}")
|
|
- if (NOT APPSTREAMCLI_BIN)
|
|
- message(FATAL_ERROR "Unable to validate appstreamcli files; appstreamcli not found")
|
|
- else ()
|
|
- add_test(NAME "${META_TARGET_NAME}_appstream_validation" COMMAND "${APPSTREAMCLI_BIN}" validate "${APPSTREAM_FILE}")
|
|
+ if (APPSTREAM_TESTS_ENABLED)
|
|
+ if (NOT APPSTREAMCLI_BIN)
|
|
+ message(FATAL_ERROR "Unable to validate appstreamcli files; appstreamcli not found")
|
|
+ else ()
|
|
+ add_test(NAME "${META_TARGET_NAME}_appstream_validation" COMMAND "${APPSTREAMCLI_BIN}" validate "${APPSTREAM_FILE}")
|
|
+ endif ()
|
|
endif ()
|
|
endfunction ()
|
|
|
|
--
|
|
2.43.0
|
|
|