diff --git a/meson.build b/meson.build index 63372c2ba..fe57114ef 100644 --- a/meson.build +++ b/meson.build @@ -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') diff --git a/meson_options.txt b/meson_options.txt index 12457d261..048a62b37 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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, diff --git a/src/tests/meson.build b/src/tests/meson.build index 0a0fa7a80..879b89e87 100644 --- a/src/tests/meson.build +++ b/src/tests/meson.build @@ -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