[mutter] Revert "main: Add test initialization function"
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] Revert "main: Add test initialization function"
- Date: Tue, 27 Aug 2019 12:33:10 +0000 (UTC)
commit 6968f17f3f2d36428aaa802d6b678a9260a13df3
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Aug 27 15:32:54 2019 +0300
Revert "main: Add test initialization function"
This reverts commit 7e69d1400a540003873518b1636b22e97621a4ce.
src/core/main.c | 19 -------------------
src/meta/main.h | 4 ----
src/tests/clutter-test-utils.h | 10 +++++++++-
3 files changed, 9 insertions(+), 24 deletions(-)
---
diff --git a/src/core/main.c b/src/core/main.c
index c32bf8b2b..b0d50d47b 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -87,7 +87,6 @@
#ifdef HAVE_WAYLAND
#include "backends/x11/nested/meta-backend-x11-nested.h"
#include "wayland/meta-wayland.h"
-#include "wayland/meta-xwayland.h"
#endif
#ifdef HAVE_NATIVE_BACKEND
@@ -742,21 +741,3 @@ meta_get_x11_display_policy (void)
return META_DISPLAY_POLICY_MANDATORY;
}
-
-void
-meta_test_init (void)
-{
-#if defined(HAVE_WAYLAND)
- g_autofree char *display_name = g_strdup ("mutter-test-display-XXXXXX");
-
- display_name = mktemp (display_name);
-
- meta_override_compositor_configuration (META_COMPOSITOR_TYPE_WAYLAND,
- META_TYPE_BACKEND_X11_NESTED);
- meta_wayland_override_display_name (display_name);
- meta_xwayland_override_display_number (512 + 512 * rand());
- meta_init ();
-#else
- g_error ("Tests require wayland support");
-#endif
-}
diff --git a/src/meta/main.h b/src/meta/main.h
index 6115b7220..b5e3d9dd5 100644
--- a/src/meta/main.h
+++ b/src/meta/main.h
@@ -75,8 +75,4 @@ void meta_exit (MetaExitCode code) G_GNUC_NORETURN;
META_EXPORT
void meta_quit (MetaExitCode code);
-META_EXPORT
-void meta_test_init (void);
-
-
#endif
diff --git a/src/tests/clutter-test-utils.h b/src/tests/clutter-test-utils.h
index f666d8773..1c4be6495 100644
--- a/src/tests/clutter-test-utils.h
+++ b/src/tests/clutter-test-utils.h
@@ -86,7 +86,13 @@ G_BEGIN_DECLS
int \
main (int argc, char *argv[]) \
{ \
- meta_test_init ();\
+ char *display_name = g_strdup ("mutter-test-display-XXXXXX");\
+ int fd = g_mkstemp (display_name);\
+ meta_wayland_override_display_name (display_name);\
+ meta_override_compositor_configuration (META_COMPOSITOR_TYPE_WAYLAND,\
+ META_TYPE_BACKEND_X11_NESTED);\
+\
+ meta_init ();\
\
clutter_test_init (&argc, &argv); \
\
@@ -94,6 +100,8 @@ main (int argc, char *argv[]) \
units \
} \
\
+ close (fd);\
+ g_free (display_name);\
return clutter_test_run (); \
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]