Fix enabling AppStream tests
This commit is contained in:
parent
9d8f897972
commit
35f56d486c
|
@ -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 ()
|
||||
|
||||
|
|
Loading…
Reference in New Issue