summaryrefslogtreecommitdiff
path: root/tests/check/generic
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2015-08-14 12:25:19 +0200
committerEdward Hervey <bilboed@bilboed.com>2015-08-15 19:04:42 +0200
commitc90f6b990b64049b9feb68c0eb34ec3acd15cee8 (patch)
tree1acf996b9eae89fd2281649645559c8017dd3797 /tests/check/generic
parent56b822f9f675bb3afeded9e5420bd0d126b5917a (diff)
checks: Ensure thread-safe libX11/GL when running tests
Diffstat (limited to 'tests/check/generic')
-rw-r--r--tests/check/generic/states.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/check/generic/states.c b/tests/check/generic/states.c
index e4a41cdaf..5df302445 100644
--- a/tests/check/generic/states.c
+++ b/tests/check/generic/states.c
@@ -26,6 +26,9 @@
#include <unistd.h>
+#include <glib.h>
+#include <glib/gprintf.h>
+#include <gmodule.h>
#include <gst/check/gstcheck.h>
static GList *elements = NULL;
@@ -235,4 +238,22 @@ states_suite (void)
return s;
}
-GST_CHECK_MAIN (states);
+int
+main (int argc, char **argv)
+{
+ Suite *s;
+ GModule *libx11;
+
+ libx11 =
+ g_module_open ("libX11.so.6", G_MODULE_BIND_LOCAL | G_MODULE_BIND_LAZY);
+ if (libx11) {
+ void (*xinitthreads) (void);
+ if (g_module_symbol (libx11, "XInitThreads", (gpointer *) & xinitthreads)) {
+ xinitthreads ();
+ }
+ g_module_close (libx11);
+ }
+ gst_check_init (&argc, &argv);
+ s = states_suite ();
+ return gst_check_run_suite (s, "states_bad", __FILE__);
+}