[gnome-characters/wip/cdavis/validate-appdata] data: Add test to validate appdata




commit ab50ecd3e39092c34c9dfe2591cd94086053e697
Author: Christopher Davis <christopherdavis gnome org>
Date:   Sat Feb 13 21:54:25 2021 -0800

    data: Add test to validate appdata

 data/meson.build | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/data/meson.build b/data/meson.build
index cf25171..106ee00 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -60,7 +60,7 @@ i18n.merge_file(
   install_dir: join_paths(characters_datadir, 'applications')
 )
 
-i18n.merge_file(
+appdata_file = i18n.merge_file(
   'appdata-file',
   input: characters_name + '.appdata.xml.in',
   output: characters_application_id + '.appdata.xml',
@@ -69,6 +69,16 @@ i18n.merge_file(
   install_dir: join_paths(characters_datadir, 'metainfo')
 )
 
+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
+
 service_conf = configuration_data()
 service_conf.set('appid', characters_application_id)
 service_conf.set('bindir', characters_bindir)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]