[gedit/zbrown/deteplification-src: 196/633] Revert "build: data: always require programs to be able to run the tests"




commit a9792ef1f1cc47bdcd87c1d8fb919c5edef0bbb6
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun Mar 15 19:06:54 2020 +0100

    Revert "build: data: always require programs to be able to run the tests"
    
    This reverts commit 9117c02ffbc46a9c69b36ba90adfa525a6488957.
    
    It's better with an option.

 data/meson.build | 62 +++++++++++++++++++++++++++++++-------------------------
 1 file changed, 34 insertions(+), 28 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index d50c78f2c..789b41d57 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -12,16 +12,18 @@ appdata_file = i18n.merge_file(
   install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'metainfo')
 )
 
-appstream_util = find_program('appstream-util')
-test(
-  'validate-appdata',
-  appstream_util,
-  args: [
-    'validate-relax',
-    '--nonet',
-    appdata_file.full_path()
-  ]
-)
+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
 
 desktop_file = 'org.gnome.gedit.desktop'
 desktop_output_file = i18n.merge_file(
@@ -34,14 +36,16 @@ desktop_output_file = i18n.merge_file(
   install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'applications')
 )
 
-desktop_file_validate = find_program('desktop-file-validate')
-test(
-  'validate-desktop',
-  desktop_file_validate,
-  args: [
-    desktop_output_file.full_path(),
-  ]
-)
+desktop_file_validate = find_program('desktop-file-validate', required: false)
+if desktop_file_validate.found()
+  test(
+    'validate-desktop',
+    desktop_file_validate,
+    args: [
+      desktop_output_file.full_path(),
+    ]
+  )
+endif
 
 active_plugins = [
   'docinfo',
@@ -75,16 +79,18 @@ gschema_dtd = join_paths(
   'gschema.dtd',
 )
 
-xmllint = find_program('xmllint')
-test(
-  'validate-gschema',
-  xmllint,
-  args: [
-    '--noout',
-    '--dtdvalid', gschema_dtd,
-    gschema_file,
-  ]
-)
+xmllint = find_program('xmllint', required: false)
+if xmllint.found()
+  test(
+    'validate-gschema',
+    xmllint,
+    args: [
+      '--noout',
+      '--dtdvalid', gschema_dtd,
+      gschema_file,
+    ]
+  )
+endif
 
 service_in = configuration_data()
 service_in.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))


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