1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
Upstream: Yes
Reason: Actually run tests
diff --git a/data/meson.build b/data/meson.build
index 349ff25..2be4ee7 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
|