[mutter] meson: Add option flags to control test suites building
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] meson: Add option flags to control test suites building
- Date: Thu, 2 May 2019 20:23:16 +0000 (UTC)
commit 5d1a87d3554a69db89bb63cebd65fadf1b82169b
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Wed Feb 13 12:51:21 2019 -0500
meson: Add option flags to control test suites building
Now the `tests` meson option controls weather we should build all the test suites
while `core_tests` controls mutter tests.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/442
meson.build | 21 +++++++++++++++------
meson_options.txt | 8 +++++++-
src/meson.build | 2 +-
3 files changed, 23 insertions(+), 8 deletions(-)
---
diff --git a/meson.build b/meson.build
index 1c865759d..2b65b036f 100644
--- a/meson.build
+++ b/meson.build
@@ -246,15 +246,23 @@ if have_introspection
]
endif
-have_cogl_tests = get_option('cogl_tests')
-have_clutter_tests = get_option('clutter_tests')
-have_installed_tests = get_option('installed_tests')
-
have_tests = get_option('tests')
+have_core_tests = false
+have_cogl_tests = false
+have_clutter_tests = false
+have_installed_tests = false
+
if have_tests
- if not have_wayland
- error('Tests require Wayland to be enabled')
+ have_core_tests = get_option('core_tests')
+ if have_core_tests
+ if not have_wayland
+ error('Tests require Wayland to be enabled')
+ endif
endif
+
+ have_cogl_tests = get_option('cogl_tests')
+ have_clutter_tests = get_option('clutter_tests')
+ have_installed_tests = get_option('installed_tests')
endif
required_functions = [
@@ -405,6 +413,7 @@ output = [
' Tests:',
'',
' Enabled.................. ' + have_tests.to_string(),
+ ' Core tests............... ' + have_core_tests.to_string(),
' Cogl tests............... ' + have_cogl_tests.to_string(),
' Clutter tests............ ' + have_clutter_tests.to_string(),
' Installed tests.......... ' + have_installed_tests.to_string(),
diff --git a/meson_options.txt b/meson_options.txt
index add49c866..1e122300e 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -111,10 +111,16 @@ option('clutter_tests',
description: 'Enable clutter tests'
)
+option('core_tests',
+ type: 'boolean',
+ value: true,
+ description: 'Enable mutter core tests'
+)
+
option('tests',
type: 'boolean',
value: true,
- description: 'Enable mutter tests'
+ description: 'Enable tests globally. Specific test suites can be controlled with core_tests,
clutter_tests, and cogl_tests'
)
option('installed_tests',
diff --git a/src/meson.build b/src/meson.build
index 1370eac0b..a55db8a25 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -875,6 +875,6 @@ pkg.generate(libmutter,
subdir('compositor/plugins')
-if have_tests
+if have_core_tests
subdir('tests')
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]