[mutter] tests/clutter/interactive: Init backend and mutter context
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] tests/clutter/interactive: Init backend and mutter context
- Date: Wed, 13 Nov 2019 14:14:22 +0000 (UTC)
commit f3b9fc8159a98412b0430403ca3d2fbefe09b06f
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Tue Nov 12 17:11:32 2019 +0100
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 <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");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]