tests: Add ways to run privileged tests without KVM
These will be skipped by default, but can be run from a TTY for easier debugging by doing: dbus-run-session -- meson test -C build --suite mutter/native/tty --setup plain Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2151>
This commit is contained in:
parent
06eb27d503
commit
812954b22c
3 changed files with 28 additions and 1 deletions
|
@ -271,6 +271,7 @@ have_cogl_tests = false
|
|||
have_clutter_tests = false
|
||||
have_native_tests = false
|
||||
have_kvm_tests = false
|
||||
have_tty_tests = false
|
||||
have_installed_tests = false
|
||||
|
||||
if have_tests
|
||||
|
@ -298,6 +299,12 @@ if have_tests
|
|||
error('KVM tests are only supported on x86_64')
|
||||
endif
|
||||
endif
|
||||
have_tty_tests = get_option('tty_tests')
|
||||
if have_tty_tests
|
||||
if not have_native_backend
|
||||
error('TTY tests need the native backend tests')
|
||||
endif
|
||||
endif
|
||||
|
||||
have_cogl_tests = get_option('cogl_tests')
|
||||
have_clutter_tests = get_option('clutter_tests')
|
||||
|
|
|
@ -153,6 +153,12 @@ option('kvm_kernel_image',
|
|||
description: 'Path to a Linux kernel image to be used for KVM testing'
|
||||
)
|
||||
|
||||
option('tty_tests',
|
||||
type: 'boolean',
|
||||
value: false,
|
||||
description: 'Enable tests that must be run on a TTY (KMS tests without KVM)'
|
||||
)
|
||||
|
||||
option('profiler',
|
||||
type: 'boolean',
|
||||
value: true,
|
||||
|
|
|
@ -395,7 +395,7 @@ if have_native_tests
|
|||
)
|
||||
endif
|
||||
|
||||
if have_kvm_tests
|
||||
if have_kvm_tests or have_tty_tests
|
||||
privileged_tests = [
|
||||
[ 'kms-render', native_kms_render_tests ],
|
||||
]
|
||||
|
@ -403,4 +403,18 @@ if have_kvm_tests
|
|||
if have_kvm_tests
|
||||
subdir('kvm')
|
||||
endif
|
||||
|
||||
if have_tty_tests
|
||||
foreach test: privileged_tests
|
||||
test_name = test[0]
|
||||
test_executable = test[1]
|
||||
|
||||
test('native-' + test_name, test_executable,
|
||||
suite: ['core', 'mutter/native/tty'],
|
||||
env: test_env,
|
||||
is_parallel: false,
|
||||
timeout: 60,
|
||||
)
|
||||
endforeach
|
||||
endif
|
||||
endif
|
||||
|
|
Loading…
Reference in a new issue