[sound-juicer/wip/hadess/fix-metainfo: 3/3] metainfo: Add test to validate metainfo files
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sound-juicer/wip/hadess/fix-metainfo: 3/3] metainfo: Add test to validate metainfo files
- Date: Mon, 7 Sep 2020 14:16:05 +0000 (UTC)
commit 0c4b724dcb439c48b0da3733cffb4fdd7da7d7ce
Author: Bastien Nocera <hadess hadess net>
Date: Mon Sep 7 16:13:17 2020 +0200
metainfo: Add test to validate metainfo files
data/meson.build | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/data/meson.build b/data/meson.build
index 9fe277e7..4c08bd0a 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -28,7 +28,7 @@ configure_file(
)
# Metainfo
-i18n.merge_file(
+metainfo_file = i18n.merge_file(
'metainfo',
input: files(join_paths('metainfo', 'org.gnome.SoundJuicer.metainfo.xml.in')),
output: 'org.gnome.SoundJuicer.metainfo.xml',
@@ -37,6 +37,15 @@ i18n.merge_file(
install_dir: join_paths(sound_juicer_datadir, 'metainfo'),
)
+# Validate Metainfo
+appstream_util = find_program('appstream-util', required: false)
+if appstream_util.found()
+ test(
+ 'validate-metainfo', appstream_util,
+ args: ['validate', metainfo_file.full_path()]
+ )
+endif
+
# GSettings
gnome.compile_schemas(
build_by_default: true,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]