[polari/wip/hadess/validate-networks-json] networks: Add test to validate networks.json




commit 5083b0ae9b744f3140769e6a71223e4f90f429e6
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Jun 18 10:56:09 2021 +0200

    networks: Add test to validate networks.json
    
    Add a test to validate that the contents of networks.json are valid.

 data/meson.build | 7 +++++++
 meson.build      | 1 +
 2 files changed, 8 insertions(+)
---
diff --git a/data/meson.build b/data/meson.build
index bee59abf..cedfd57b 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -20,6 +20,13 @@ if (desktop_file_validate.found())
   )
 endif
 
+if (json_glib_validate.found())
+  test('Validating ' + 'networks.json',
+    json_glib_validate,
+    args: [files('resources/networks.json')]
+  )
+endif
+
 service_conf = configuration_data()
 service_conf.set('bindir', bindir)
 
diff --git a/meson.build b/meson.build
index e7fb0e04..acfb1a2f 100644
--- a/meson.build
+++ b/meson.build
@@ -30,6 +30,7 @@ typelibdir = join_paths(pkglibdir, 'girepository-1.0')
 js_shell = find_program('js78', required: false)
 
 desktop_file_validate = find_program('desktop-file-validate', required: false)
+json_glib_validate = find_program('json-glib-validate', required: false)
 appstream_util = find_program('appstream-util', required: false)
 
 gio = dependency('gio-2.0', version: '>= 2.43.4')


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