tests: Disable XWayland tests if it is not enabled

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2399>
This commit is contained in:
Bilal Elmoussaoui 2022-12-02 12:41:52 +01:00 committed by Marge Bot
parent 6ea70600af
commit a4d1b50b3b
2 changed files with 13 additions and 7 deletions

View File

@ -382,13 +382,6 @@ if have_native_tests
wayland_test_utils,
],
},
{
'name': 'xwayland',
'suite': 'wayland',
'sources': [
'xwayland-tests.c',
],
},
{
'name': 'wayland-fullscreen',
'suite': 'wayland',
@ -398,6 +391,17 @@ if have_native_tests
],
},
]
if have_xwayland
test_cases += [
{
'name': 'xwayland',
'suite': 'wayland',
'sources': [
'xwayland-tests.c',
],
},
]
endif
foreach test_case: test_cases
test_executable = executable('mutter-' + test_case['name'],

View File

@ -83,7 +83,9 @@ meta_context_test_configure (MetaContext *context,
meta_ensure_test_client_path (*argc, *argv);
meta_wayland_override_display_name ("mutter-test-display");
#ifdef HAVE_XWAYLAND
meta_xwayland_override_display_number (512);
#endif
plugin_name = g_getenv ("MUTTER_TEST_PLUGIN_PATH");
if (!plugin_name)