diff options
author | Marcus Lundblad <ml@update.uu.se> | 2019-04-08 22:47:40 +0200 |
---|---|---|
committer | Marcus Lundblad <ml@update.uu.se> | 2019-04-10 21:51:35 +0200 |
commit | 7ed2ff45342bda73244c7675677ab1d63e4527eb (patch) | |
tree | bfdef51d9697964fd5429fffd074ce173ecc355a | |
parent | f8dc7819d38d169b513d15b5703e44d6d32de177 (diff) | |
download | gnome-maps-7ed2ff45342bda73244c7675677ab1d63e4527eb.tar.gz |
meson: Add validation tests for desktop and appdatawip/mlundblad/meson-appdata-tests
Fixes #174
-rw-r--r-- | data/meson.build | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/data/meson.build b/data/meson.build index 349ff25c..2be4ee73 100644 --- a/data/meson.build +++ b/data/meson.build @@ -13,7 +13,7 @@ install_data( desktop = app_id + '.desktop' -custom_target('desktop-file', +desktop_file = custom_target('desktop-file', input: desktop + '.in', output: desktop, install: true, @@ -32,7 +32,7 @@ install_data( appdata = app_id + '.appdata.xml' -i18n.merge_file( +appdata_file = i18n.merge_file( appdata, input: appdata + '.in', output: appdata, @@ -53,4 +53,28 @@ configure_file( install_dir: join_paths(datadir, 'dbus-1', 'services') ) -subdir('icons') +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 + +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 + +subdir('icons')
\ No newline at end of file |