[gnome-mines] Meson: add tests to validate desktop & appdata files
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-mines] Meson: add tests to validate desktop & appdata files
- Date: Thu, 10 Jan 2019 10:26:22 +0000 (UTC)
commit 29c5435a11322138ea3b73fd5e57f437c362938b
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date: Wed Jan 9 20:33:12 2019 +0000
Meson: add tests to validate desktop & appdata files
data/meson.build | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index abac290..b2e2b6c 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -16,7 +16,7 @@ foreach theme: [ 'default', 'bgcolors', 'classic' ]
endforeach
endforeach
-i18n.merge_file ('desktop-file',
+desktop_file = i18n.merge_file ('desktop-file',
input: '@0 desktop in'.format(app_id),
output: '@0@.desktop'.format(app_id),
install: true,
@@ -24,11 +24,33 @@ i18n.merge_file ('desktop-file',
po_dir: '../po',
type: 'desktop')
-i18n.merge_file ('appdata-file',
+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
+
+
+appdata_file = i18n.merge_file ('appdata-file',
input: '@0 appdata xml in'.format(app_id),
output: '@0 appdata xml'.format(app_id),
install: true,
install_dir: join_paths (datadir, 'metainfo'),
po_dir: '../po')
+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
+
install_man ('gnome-mines.6')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]