mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-19 22:05:58 +00:00
checks: Ensure thread-safe libX11/GL when running tests
This commit is contained in:
parent
56b822f9f6
commit
c90f6b990b
2 changed files with 31 additions and 2 deletions
|
@ -233,4 +233,12 @@ glimagesink_suite (void)
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_CHECK_MAIN (glimagesink)
|
int
|
||||||
|
main (int argc, char **argv)
|
||||||
|
{
|
||||||
|
Suite *s;
|
||||||
|
g_setenv ("GST_GL_XINITTHREADS", "1", TRUE);
|
||||||
|
gst_check_init (&argc, &argv);
|
||||||
|
s = glimagesink_suite ();
|
||||||
|
return gst_check_run_suite (s, "glimagesink", __FILE__);
|
||||||
|
}
|
||||||
|
|
|
@ -26,6 +26,9 @@
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include <glib.h>
|
||||||
|
#include <glib/gprintf.h>
|
||||||
|
#include <gmodule.h>
|
||||||
#include <gst/check/gstcheck.h>
|
#include <gst/check/gstcheck.h>
|
||||||
|
|
||||||
static GList *elements = NULL;
|
static GList *elements = NULL;
|
||||||
|
@ -235,4 +238,22 @@ states_suite (void)
|
||||||
return s;
|
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__);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue