Meson: add tests to validate desktop & appdata files
This commit is contained in:
parent
ca4a3d64eb
commit
32424e7938
@ -2,7 +2,7 @@ subdir('icons')
|
||||
|
||||
desktop_conf = configuration_data()
|
||||
desktop_conf.set('icon', application_id)
|
||||
i18n.merge_file ('desktop-file',
|
||||
desktop_file = i18n.merge_file ('desktop-file',
|
||||
type: 'desktop',
|
||||
input: configure_file(
|
||||
input: files('org.gnome.Podcasts.desktop.in.in'),
|
||||
@ -14,10 +14,20 @@ i18n.merge_file ('desktop-file',
|
||||
install: true,
|
||||
install_dir: join_paths (datadir, 'applications')
|
||||
)
|
||||
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_conf = configuration_data()
|
||||
appdata_conf.set('appid', application_id)
|
||||
i18n.merge_file ('appdata-file',
|
||||
appdata_file = i18n.merge_file ('appdata-file',
|
||||
input: configure_file(
|
||||
input: files('org.gnome.Podcasts.appdata.xml.in.in'),
|
||||
output: 'org.gnome.Podcasts.appdata.xml.in',
|
||||
@ -28,6 +38,16 @@ i18n.merge_file ('appdata-file',
|
||||
install: true,
|
||||
install_dir: join_paths (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
|
||||
|
||||
|
||||
install_data('org.gnome.Podcasts.gschema.xml', install_dir: join_paths(datadir, 'glib-2.0', 'schemas'))
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user