summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Borges <felipeborges@gnome.org>2021-03-11 12:16:44 +0100
committerFelipe Borges <felipeborges@gnome.org>2021-03-11 12:55:10 +0100
commitb53622e331fe55cec82e0a5b81e5df56c6491220 (patch)
treeda0dc9d113714944f884a6ebf15f550bd3688480
parent1cc5f62527d7e4031f71cf6090ecdd90d0d89a84 (diff)
downloadgnome-bluetooth-b53622e331fe55cec82e0a5b81e5df56c6491220.tar.gz
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".
-rw-r--r--meson.build5
-rw-r--r--tests/meson.build14
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
+)