const GType *otypes;
guint i;
gchar *schema_dir;
- GTestDBus *bus;
- GMainLoop *loop;
- gint result;
/* These must be set before before gtk_test_init */
g_setenv ("GIO_USE_VFS", "local", TRUE);
if (g_getenv ("GTK_TEST_MESON") == NULL)
g_setenv ("GSETTINGS_SCHEMA_DIR", schema_dir, TRUE);
- /* Create one test bus for all tests, as we have a lot of very small
- * and quick tests.
- */
- bus = g_test_dbus_new (G_TEST_DBUS_NONE);
- g_test_dbus_up (bus);
-
otypes = gtk_test_list_all_types (NULL);
for (i = 0; otypes[i]; i++)
{
g_free (testname);
}
- result = g_test_run();
-
- /* Work around the annoying issue that g_test_dbus_down is giving
- * us an "Error while sending AddMatch" that comes out of an idle
- */
- loop = g_main_loop_new (NULL, FALSE);
- g_timeout_add (1000, (GSourceFunc)g_main_loop_quit, loop);
- g_main_loop_run (loop);
- g_main_loop_unref (loop);
-
- g_test_dbus_down (bus);
- g_object_unref (bus);
- g_free (schema_dir);
-
- return result;
+ return g_test_run();
}
const GType *all_types;
guint n_types = 0, i;
gchar *schema_dir;
- GTestDBus *bus;
- gint result;
+ int result;
/* These must be set before before gtk_test_init */
g_setenv ("GIO_USE_VFS", "local", TRUE);
if (g_getenv ("GTK_TEST_MESON") == NULL)
g_setenv ("GSETTINGS_SCHEMA_DIR", schema_dir, TRUE);
- /* Create one test bus for all tests, as we have a lot of very small
- * and quick tests.
- */
- bus = g_test_dbus_new (G_TEST_DBUS_NONE);
- g_test_dbus_up (bus);
-
all_types = gtk_test_list_all_types (&n_types);
for (i = 0; i < n_types; i++)
result = g_test_run();
- g_test_dbus_down (bus);
- g_object_unref (bus);
g_free (schema_dir);
return result;