mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 14:10:30 +00:00
testsuite: Make tests run without a11y bus
Not having an a11y bus around causes warnings from at-spi, which make tests fail. Explicitly ignore those warnings.
This commit is contained in:
parent
34cc68003c
commit
d1bd1270c9
@ -415,6 +415,19 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
g_type_class_unref (klass);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
dbind_warning_handler (const char *log_domain,
|
||||
GLogLevelFlags log_level,
|
||||
const char *message,
|
||||
gpointer user_data)
|
||||
{
|
||||
if (strcmp (log_domain, "dbind") == 0 &&
|
||||
log_level == (G_LOG_LEVEL_WARNING|G_LOG_FLAG_FATAL))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
@ -445,6 +458,8 @@ main (int argc, char **argv)
|
||||
if (x_r_d)
|
||||
g_setenv ("XDG_RUNTIME_DIR", x_r_d, TRUE);
|
||||
|
||||
g_test_log_set_fatal_handler (dbind_warning_handler, NULL);
|
||||
|
||||
gtk_test_init (&argc, &argv);
|
||||
gtk_test_register_all_types();
|
||||
|
||||
|
@ -101,6 +101,19 @@ test_finalize_object (gconstpointer data)
|
||||
gtk_main();
|
||||
}
|
||||
|
||||
static gboolean
|
||||
dbind_warning_handler (const char *log_domain,
|
||||
GLogLevelFlags log_level,
|
||||
const char *message,
|
||||
gpointer user_data)
|
||||
{
|
||||
if (strcmp (log_domain, "dbind") == 0 &&
|
||||
log_level == (G_LOG_LEVEL_WARNING|G_LOG_FLAG_FATAL))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
@ -129,11 +142,12 @@ main (int argc, char **argv)
|
||||
if (x_r_d)
|
||||
g_setenv ("XDG_RUNTIME_DIR", x_r_d, TRUE);
|
||||
|
||||
g_test_log_set_fatal_handler (dbind_warning_handler, NULL);
|
||||
|
||||
/* initialize test program */
|
||||
gtk_test_init (&argc, &argv);
|
||||
gtk_test_register_all_types ();
|
||||
|
||||
|
||||
all_types = gtk_test_list_all_types (&n_types);
|
||||
|
||||
for (i = 0; i < n_types; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user