mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 17:10:40 -05:00
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
This commit is contained in:
parent
34312c272b
commit
5d1a87d355
17
meson.build
17
meson.build
@ -246,15 +246,23 @@ if have_introspection
|
|||||||
]
|
]
|
||||||
endif
|
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_tests = get_option('tests')
|
||||||
|
have_core_tests = false
|
||||||
|
have_cogl_tests = false
|
||||||
|
have_clutter_tests = false
|
||||||
|
have_installed_tests = false
|
||||||
|
|
||||||
if have_tests
|
if have_tests
|
||||||
|
have_core_tests = get_option('core_tests')
|
||||||
|
if have_core_tests
|
||||||
if not have_wayland
|
if not have_wayland
|
||||||
error('Tests require Wayland to be enabled')
|
error('Tests require Wayland to be enabled')
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
have_cogl_tests = get_option('cogl_tests')
|
||||||
|
have_clutter_tests = get_option('clutter_tests')
|
||||||
|
have_installed_tests = get_option('installed_tests')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
required_functions = [
|
required_functions = [
|
||||||
@ -405,6 +413,7 @@ output = [
|
|||||||
' Tests:',
|
' Tests:',
|
||||||
'',
|
'',
|
||||||
' Enabled.................. ' + have_tests.to_string(),
|
' Enabled.................. ' + have_tests.to_string(),
|
||||||
|
' Core tests............... ' + have_core_tests.to_string(),
|
||||||
' Cogl tests............... ' + have_cogl_tests.to_string(),
|
' Cogl tests............... ' + have_cogl_tests.to_string(),
|
||||||
' Clutter tests............ ' + have_clutter_tests.to_string(),
|
' Clutter tests............ ' + have_clutter_tests.to_string(),
|
||||||
' Installed tests.......... ' + have_installed_tests.to_string(),
|
' Installed tests.......... ' + have_installed_tests.to_string(),
|
||||||
|
@ -111,10 +111,16 @@ option('clutter_tests',
|
|||||||
description: 'Enable clutter tests'
|
description: 'Enable clutter tests'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
option('core_tests',
|
||||||
|
type: 'boolean',
|
||||||
|
value: true,
|
||||||
|
description: 'Enable mutter core tests'
|
||||||
|
)
|
||||||
|
|
||||||
option('tests',
|
option('tests',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
value: true,
|
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',
|
option('installed_tests',
|
||||||
|
@ -875,6 +875,6 @@ pkg.generate(libmutter,
|
|||||||
|
|
||||||
subdir('compositor/plugins')
|
subdir('compositor/plugins')
|
||||||
|
|
||||||
if have_tests
|
if have_core_tests
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user