[gnome-bluetooth/dont-run-tests-without-introspection] build: Only run tests if introspection is enabled




commit b53622e331fe55cec82e0a5b81e5df56c6491220
Author: Felipe Borges <felipeborges gnome org>
Date:   Thu Mar 11 12:16:44 2021 +0100

    build: Only run tests if introspection is enabled
    
    A build with -Dintrospection=false will fail if tests are ran.
    
    The integration tests added by commit 77b67c702 are written in
    Python and require gobject-introspection bindings to be generated.
    
    meson errors out with:
    ../tests/meson.build:7:0: ERROR: Unknown variable "gnomebt_priv_gir".

 meson.build       |  5 ++++-
 tests/meson.build | 14 ++++++--------
 2 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/meson.build b/meson.build
index 2a1d726f..09ec3cc5 100644
--- a/meson.build
+++ b/meson.build
@@ -114,7 +114,10 @@ if enable_gtk_doc
 endif
 
 subdir('po')
-subdir('tests')
+
+if enable_gir
+  subdir('tests')
+endif
 
 configure_file(
   output: 'config.h',
diff --git a/tests/meson.build b/tests/meson.build
index 1ba99212..cd8dec99 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -6,11 +6,9 @@ envs.set ('top_srcdir', meson.source_root())
 
 test_deps = [ gnomebt_priv_gir, ]
 
-if enable_gir
-  test('gnome-bluetooth-integration-test',
-    integration_test,
-    args: [ 'Tests' ],
-    env: envs,
-    depends: test_deps
-    )
-endif
+test('gnome-bluetooth-integration-test',
+  integration_test,
+  args: [ 'Tests' ],
+  env: envs,
+  depends: test_deps
+)


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