build: Make native backend mandatory for all tests
This allows us one less level of indentation of all the tests. It is not entirely true, the X11 backend test case script can run without it, but it isn't valuable enough to run without the native backend being enabled to complicate building. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3812>
This commit is contained in:
parent
24a8ef5033
commit
465af4b2d3
5 changed files with 369 additions and 385 deletions
|
@ -442,8 +442,7 @@ build-without-native-backend-and-wayland@x86_64:
|
|||
-Dudev=false
|
||||
-Dwayland=false
|
||||
-Dxwayland=false
|
||||
-Dcore_tests=false
|
||||
-Dnative_tests=false
|
||||
-Dtests=disabled
|
||||
-Dintrospection=false
|
||||
- meson compile -C build
|
||||
- sudo meson install --no-rebuild -C build
|
||||
|
@ -464,8 +463,7 @@ build-wayland-only@x86_64:
|
|||
-Dbuildtype=debugoptimized
|
||||
-Dwayland=true
|
||||
-Dxwayland=false
|
||||
-Dcore_tests=false
|
||||
-Dnative_tests=false
|
||||
-Dtests=disabled
|
||||
-Dintrospection=false
|
||||
- meson compile -C build
|
||||
- sudo meson install --no-rebuild -C build
|
||||
|
|
26
meson.build
26
meson.build
|
@ -1,6 +1,6 @@
|
|||
project('mutter', 'c',
|
||||
version: '46.1',
|
||||
meson_version: '>= 0.60.0',
|
||||
meson_version: '>= 1.1.0',
|
||||
license: 'GPLv2+'
|
||||
)
|
||||
|
||||
|
@ -343,11 +343,10 @@ int main (int argc, char ** argv) {
|
|||
have_malloc_trim = meson.get_compiler('c').has_function('malloc_trim')
|
||||
|
||||
have_documentation = get_option('docs')
|
||||
have_tests = get_option('tests')
|
||||
have_core_tests = false
|
||||
have_tests = get_option('tests').enable_auto_if(have_native_backend).enabled()
|
||||
have_mutter_tests = false
|
||||
have_cogl_tests = false
|
||||
have_clutter_tests = false
|
||||
have_native_tests = false
|
||||
have_kvm_tests = false
|
||||
have_tty_tests = false
|
||||
have_installed_tests = false
|
||||
|
@ -357,8 +356,12 @@ if have_tests
|
|||
gtk3_dep = dependency('gtk+-3.0', version: gtk3_req)
|
||||
dbusmock_dep = python.find_installation('python3', modules: ['dbusmock'], required: false)
|
||||
|
||||
have_core_tests = get_option('core_tests')
|
||||
if have_core_tests
|
||||
if not have_native_backend
|
||||
error('Tests require the native backend to be enabled')
|
||||
endif
|
||||
|
||||
have_mutter_tests = get_option('mutter_tests')
|
||||
if have_mutter_tests
|
||||
if not have_wayland
|
||||
error('Tests require Wayland to be enabled')
|
||||
endif
|
||||
|
@ -369,15 +372,6 @@ if have_tests
|
|||
error('Tests require python-dbusmock')
|
||||
endif
|
||||
endif
|
||||
have_native_tests = get_option('native_tests')
|
||||
if have_native_tests
|
||||
if not have_native_backend
|
||||
error('Native tests require the native backend')
|
||||
endif
|
||||
if not have_remote_desktop
|
||||
error('Native tests require remote desktop')
|
||||
endif
|
||||
endif
|
||||
have_kvm_tests = get_option('kvm_tests')
|
||||
if have_kvm_tests
|
||||
if not have_native_backend
|
||||
|
@ -754,7 +748,7 @@ summary('Xwayland byte-swapped clients', have_xwayland_byte_swapped_clients, sec
|
|||
summary('Xwayland enable EI portal', have_xwayland_enable_ei_portal, section: 'Options')
|
||||
|
||||
summary('Enabled', have_tests, section: 'Tests')
|
||||
summary('Core tests', have_core_tests, section: 'Tests')
|
||||
summary('Mutter tests', have_mutter_tests, section: 'Tests')
|
||||
summary('Cogl tests', have_cogl_tests, section: 'Tests')
|
||||
summary('Clutter tests', have_clutter_tests, section: 'Tests')
|
||||
summary('KVM tests', have_kvm_tests, section: 'Tests')
|
||||
|
|
|
@ -147,22 +147,16 @@ option('clutter_tests',
|
|||
description: 'Enable clutter tests'
|
||||
)
|
||||
|
||||
option('core_tests',
|
||||
option('mutter_tests',
|
||||
type: 'boolean',
|
||||
value: true,
|
||||
description: 'Enable mutter core tests'
|
||||
)
|
||||
|
||||
option('native_tests',
|
||||
type: 'boolean',
|
||||
value: true,
|
||||
description: 'Enable mutter native backend tests'
|
||||
)
|
||||
|
||||
option('tests',
|
||||
type: 'boolean',
|
||||
value: true,
|
||||
description: 'Enable tests globally. Specific test suites can be controlled with core_tests, clutter_tests, and cogl_tests'
|
||||
type: 'feature',
|
||||
value: 'auto',
|
||||
description: 'Enable tests globally. Specific test suites can be controlled with mutter_tests, clutter_tests, and cogl_tests'
|
||||
)
|
||||
|
||||
option('kvm_tests',
|
||||
|
|
|
@ -1326,6 +1326,6 @@ if have_x11_client
|
|||
subdir('frames')
|
||||
endif
|
||||
|
||||
if have_core_tests
|
||||
if have_tests
|
||||
subdir('tests')
|
||||
endif
|
||||
|
|
|
@ -310,7 +310,6 @@ test_cases += [
|
|||
},
|
||||
]
|
||||
|
||||
if have_native_tests
|
||||
screen_cast_client = executable('mutter-screen-cast-client',
|
||||
sources: [
|
||||
'screen-cast-client.c',
|
||||
|
@ -692,7 +691,6 @@ if have_native_tests
|
|||
timeout: 60,
|
||||
)
|
||||
endforeach
|
||||
endif
|
||||
|
||||
stacking_tests = [
|
||||
'basic-x11',
|
||||
|
|
Loading…
Add table
Reference in a new issue