tests: Use g_test_init instead of gtk_test_init
gtk_test_init() ends up calling gtk_init() which tries opening the default display. CI jobs sometimes seem to trip over this even when run through xvfb-run. Therefore we use g_test_init() instead.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
#include "calls-origin.h"
|
||||
#include "common.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <glib.h>
|
||||
#include <string.h>
|
||||
|
||||
static void
|
||||
@@ -79,8 +79,7 @@ gint
|
||||
main (gint argc,
|
||||
gchar *argv[])
|
||||
{
|
||||
gtk_test_init (&argc, &argv, NULL);
|
||||
|
||||
g_test_init (&argc, &argv, NULL);
|
||||
|
||||
#define add_test(name) add_calls_test(Origin, origin, name)
|
||||
|
||||
@@ -90,6 +89,5 @@ main (gint argc,
|
||||
|
||||
#undef add_test
|
||||
|
||||
|
||||
return g_test_run();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user