diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2011-04-20 00:43:59 +0200 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2011-04-26 11:50:36 +0200 |
commit | eddcf0ef3d0b8445618e368328d7e110a83b69b3 (patch) | |
tree | 937533db5a23c50d32b8b6d46d2f493557ed310a /src/up-device.c | |
parent | f65aa4dbf2721a660300d14fc3a582d3be3c3072 (diff) | |
download | upower-eddcf0ef3d0b8445618e368328d7e110a83b69b3.tar.gz |
Add option to run daemon on the session bus for testing
Add a daemon option --test which will run upowerd on the session bus. This
allows us to run tests without interfering with the system instance. This also
avoids any root privileges entirely, which permits running integration tests as
part of a package build.
Diffstat (limited to 'src/up-device.c')
-rw-r--r-- | src/up-device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/up-device.c b/src/up-device.c index 74b90d3..3591125 100644 --- a/src/up-device.c +++ b/src/up-device.c @@ -881,7 +881,7 @@ up_device_init (UpDevice *device) device->priv->during_coldplug = FALSE; device->priv->history = up_history_new (); - device->priv->system_bus_connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error); + device->priv->system_bus_connection = dbus_g_bus_get (up_daemon_get_bus_type (), &error); if (device->priv->system_bus_connection == NULL) { g_error ("error getting system bus: %s", error->message); g_error_free (error); |