[gnome-maps/wip/mlundblad/meson-appdata-tests] WIP: meson: Add validation tests for desktop and appdata
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/meson-appdata-tests] WIP: meson: Add validation tests for desktop and appdata
- Date: Tue, 9 Apr 2019 18:56:22 +0000 (UTC)
commit 9e2b8323c0a28fa1ab5cf4ee471c94d182419b74
Author: Marcus Lundblad <ml update uu se>
Date: Mon Apr 8 22:47:40 2019 +0200
WIP: meson: Add validation tests for desktop and appdata
Fixes #174
data/meson.build | 30 +++++++++++++++++++++++++++---
1 file changed, 27 insertions(+), 3 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index 349ff25..2be4ee7 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -13,7 +13,7 @@ install_data(
desktop = app_id + '.desktop'
-custom_target('desktop-file',
+desktop_file = custom_target('desktop-file',
input: desktop + '.in',
output: desktop,
install: true,
@@ -32,7 +32,7 @@ install_data(
appdata = app_id + '.appdata.xml'
-i18n.merge_file(
+appdata_file = i18n.merge_file(
appdata,
input: appdata + '.in',
output: appdata,
@@ -53,4 +53,28 @@ configure_file(
install_dir: join_paths(datadir, 'dbus-1', 'services')
)
-subdir('icons')
+desktop_file_validate = find_program('desktop-file-validate', required: false)
+if desktop_file_validate.found()
+ test(
+ 'validate-desktop',
+ desktop_file_validate,
+ args: [
+ desktop_file.full_path()
+ ]
+ )
+endif
+
+appstream_util = find_program('appstream-util', required: false)
+if appstream_util.found()
+ test(
+ 'validate-appdata',
+ appstream_util,
+ args: [
+ 'validate-relax',
+ '--nonet',
+ appdata_file.full_path()
+ ]
+ )
+endif
+
+subdir('icons')
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]