[tali/meson-tests] Meson: add tests to validate desktop/appdata files
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tali/meson-tests] Meson: add tests to validate desktop/appdata files
- Date: Sun, 20 Jan 2019 23:23:33 +0000 (UTC)
commit 87d592b97a727775d39cb23877c2335f799fcca6
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date: Sun Jan 20 23:23:17 2019 +0000
Meson: add tests to validate desktop/appdata files
data/meson.build | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index 51d54aa..a9e65d5 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -25,7 +25,7 @@ install_data (project_id + '.gschema.xml',
install_dir: join_paths (datadir, 'glib-2.0', 'schemas'))
meson.add_install_script ('meson_compile_gschema.py')
-i18n.merge_file ('desktop-file',
+desktop_file = i18n.merge_file ('desktop-file',
input: project_id + '.desktop.in',
output: project_id + '.desktop',
install: true,
@@ -33,11 +33,31 @@ i18n.merge_file ('desktop-file',
po_dir: '../po',
type: 'desktop')
-i18n.merge_file ('appdata-file',
+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: project_id + '.appdata.xml.in',
output: project_id + '.appdata.xml',
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 ('tali.6')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]