From f3b9fc8159a98412b0430403ca3d2fbefe09b06f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Tue, 12 Nov 2019 17:11:32 +0100 Subject: [PATCH] tests/clutter/interactive: Init backend and mutter context As was with the tests run via meson test, for the interactive tests we too need to configure the mutter backend and initialize things in order to be able to run any tests. https://gitlab.gnome.org/GNOME/mutter/merge_requests/932 --- src/tests/clutter/interactive/meson.build | 1 + src/tests/clutter/interactive/test-main.c | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/tests/clutter/interactive/meson.build b/src/tests/clutter/interactive/meson.build index ae6bda165..4d8d07b02 100644 --- a/src/tests/clutter/interactive/meson.build +++ b/src/tests/clutter/interactive/meson.build @@ -83,6 +83,7 @@ executable('test-interactive', dependencies: [ clutter_deps, libmutter_clutter_dep, + libmutter_dep, gdk_pixbuf_dep, ], install: false, diff --git a/src/tests/clutter/interactive/test-main.c b/src/tests/clutter/interactive/test-main.c index 586d6dc70..95b45bb4c 100644 --- a/src/tests/clutter/interactive/test-main.c +++ b/src/tests/clutter/interactive/test-main.c @@ -1,8 +1,15 @@ +#include "config.h" + #include #include #include #include +#include "backends/x11/nested/meta-backend-x11-nested.h" +#include "core/main-private.h" +#include "meta/main.h" +#include "wayland/meta-wayland.h" +#include "wayland/meta-xwayland.h" #include "test-unit-names.h" #define MAX_DESC_SIZE 72 @@ -119,6 +126,12 @@ main (int argc, char **argv) g_option_context_free (context); + meta_wayland_override_display_name ("mutter-test-display"); + meta_xwayland_override_display_number (512); + meta_override_compositor_configuration (META_COMPOSITOR_TYPE_WAYLAND, + META_TYPE_BACKEND_X11_NESTED); + meta_init (); + module = g_module_open (NULL, 0); if (!module) g_error ("*** Failed to open self for symbol lookup");