mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
Make the dbus menu tests independent from the session bus
With this change, DBUS_SESSION_BUS_ADDRESS= make check succeed here.
This commit is contained in:
parent
d036960d30
commit
6a57bf1243
@ -433,6 +433,7 @@ gapplication_example_cmdline3_LDADD = $(progs_ldadd)
|
||||
gapplication_example_actions_SOURCES = gapplication-example-actions.c
|
||||
gapplication_example_actions_LDADD = $(progs_ldadd)
|
||||
|
||||
gmenumodel_SOURCES = gmenumodel.c gdbus-sessionbus.h gdbus-sessionbus.c
|
||||
gmenumodel_LDADD = $(progs_ldadd)
|
||||
|
||||
schema_tests = \
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include <gio/gio.h>
|
||||
|
||||
#include "gdbus-sessionbus.h"
|
||||
|
||||
/* Markup printing {{{1 */
|
||||
|
||||
/* This used to be part of GLib, but it was removed before the stable
|
||||
@ -1019,10 +1021,16 @@ test_mutable (void)
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
g_test_init (&argc, &argv, NULL);
|
||||
gboolean ret;
|
||||
|
||||
g_test_init (&argc, &argv, NULL);
|
||||
g_type_init ();
|
||||
|
||||
g_unsetenv ("DISPLAY");
|
||||
g_setenv ("DBUS_SESSION_BUS_ADDRESS", session_bus_get_temporary_address (), TRUE);
|
||||
|
||||
session_bus_up ();
|
||||
|
||||
g_test_add_func ("/gmenu/equality", test_equality);
|
||||
g_test_add_func ("/gmenu/random", test_random);
|
||||
g_test_add_func ("/gmenu/dbus/roundtrip", test_dbus_roundtrip);
|
||||
@ -1032,6 +1040,10 @@ main (int argc, char **argv)
|
||||
g_test_add_func ("/gmenu/links", test_links);
|
||||
g_test_add_func ("/gmenu/mutable", test_mutable);
|
||||
|
||||
return g_test_run ();
|
||||
ret = g_test_run ();
|
||||
|
||||
session_bus_down ();
|
||||
|
||||
return ret;
|
||||
}
|
||||
/* vim:set foldmethod=marker: */
|
||||
|
Loading…
Reference in New Issue
Block a user