[gnome-weather] tests: Make dogtail tests optional



commit aba5aa8c07c2f3f760a579e97c98d3b3bd5ebf0b
Author: Christopher Davis <brainblasted disroot org>
Date:   Tue Sep 24 16:40:12 2019 -0700

    tests: Make dogtail tests optional
    
    This is how it was prior to the move to meson.
    Now dist tarballs will not block on the state of the dogtail
    tests, nor will regular packages.

 meson_options.txt |  2 ++
 tests/meson.build | 16 +++++++++-------
 2 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/meson_options.txt b/meson_options.txt
index a9e396d..07a801b 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -7,3 +7,5 @@ option(
   ],
   value: 'default'
 )
+option('dogtail', type: 'boolean', value: false)
+
diff --git a/tests/meson.build b/tests/meson.build
index 7f81dcf..f43edfb 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,7 +1,9 @@
-pyexec = find_program('python3')
-test(
-  'world_view',
-  pyexec,
-  args: [join_paths('tests', 'world_view.py')],
-  workdir: meson.source_root()
-)
+if get_option('dogtail')
+  pyexec = find_program('python3')
+  test(
+    'world_view',
+    pyexec,
+    args: [join_paths('tests', 'world_view.py')],
+    workdir: meson.source_root()
+  )
+endif


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