1
0
Fork 0

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
This commit is contained in:
Jonas Ådahl 2019-11-12 17:11:32 +01:00 committed by Georges Basile Stavracas Neto
parent 8907a29912
commit f3b9fc8159
2 changed files with 14 additions and 0 deletions

View file

@ -83,6 +83,7 @@ executable('test-interactive',
dependencies: [
clutter_deps,
libmutter_clutter_dep,
libmutter_dep,
gdk_pixbuf_dep,
],
install: false,

View file

@ -1,8 +1,15 @@
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gmodule.h>
#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");