mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 14:36:13 +01:00
tests: Add a way to get the mock session bus address in tests
This is better than using `g_getenv ("DBUS_SESSION_BUS_ADDRESS")` as it will fail more explicitly if the mock bus somehow isn’t running. This will be used in an upcoming commit. Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
parent
019de2cbbc
commit
d7bb4664e7
@ -71,3 +71,10 @@ session_bus_run (void)
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *
|
||||||
|
session_bus_get_address (void)
|
||||||
|
{
|
||||||
|
g_assert (singleton != NULL);
|
||||||
|
return g_test_dbus_get_bus_address (singleton);
|
||||||
|
}
|
||||||
|
@ -31,6 +31,7 @@ void session_bus_up (void);
|
|||||||
void session_bus_stop (void);
|
void session_bus_stop (void);
|
||||||
void session_bus_down (void);
|
void session_bus_down (void);
|
||||||
gint session_bus_run (void);
|
gint session_bus_run (void);
|
||||||
|
const char *session_bus_get_address (void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user