From fe1d9fb4a73612681b0351202721fdfca179a0f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 12 Nov 2018 11:28:56 +0100 Subject: [PATCH] tests: Override Wayland display name in test_init() It's overridden by all test cases, but they all also call test_init() so do it there instead. https://gitlab.gnome.org/GNOME/mutter/issues/193 --- src/tests/headless-start-test.c | 1 - src/tests/test-runner.c | 1 - src/tests/test-utils.c | 2 ++ src/tests/unit-tests.c | 1 - 4 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/tests/headless-start-test.c b/src/tests/headless-start-test.c index 18fecbb96..d21c73458 100644 --- a/src/tests/headless-start-test.c +++ b/src/tests/headless-start-test.c @@ -189,7 +189,6 @@ main (int argc, char *argv[]) meta_override_compositor_configuration (META_COMPOSITOR_TYPE_WAYLAND, META_TYPE_BACKEND_TEST); - meta_wayland_override_display_name ("mutter-test-display"); meta_init (); meta_register_with_session (); diff --git a/src/tests/test-runner.c b/src/tests/test-runner.c index 343865952..f5f476b8a 100644 --- a/src/tests/test-runner.c +++ b/src/tests/test-runner.c @@ -797,7 +797,6 @@ main (int argc, char **argv) g_option_context_free (ctx); meta_plugin_manager_load (test_get_plugin_name ()); - meta_wayland_override_display_name ("mutter-test-display"); meta_init (); meta_register_with_session (); diff --git a/src/tests/test-utils.c b/src/tests/test-utils.c index ceac34e9d..8ffaff14f 100644 --- a/src/tests/test-utils.c +++ b/src/tests/test-utils.c @@ -92,6 +92,8 @@ test_init (int *argc, g_test_bug_base ("http://bugzilla.gnome.org/show_bug.cgi?id="); ensure_test_client_path (*argc, *argv); + + meta_wayland_override_display_name ("mutter-test-display"); } AsyncWaiter * diff --git a/src/tests/unit-tests.c b/src/tests/unit-tests.c index 50ec89dc5..103d68b2e 100644 --- a/src/tests/unit-tests.c +++ b/src/tests/unit-tests.c @@ -263,7 +263,6 @@ main (int argc, char *argv[]) meta_override_compositor_configuration (META_COMPOSITOR_TYPE_WAYLAND, META_TYPE_BACKEND_TEST); - meta_wayland_override_display_name ("mutter-test-display"); meta_init (); meta_register_with_session ();