diff options
author | William Hua <william.hua@canonical.com> | 2015-10-06 17:26:34 +0000 |
---|---|---|
committer | CI Train Bot <ci-train-bot@canonical.com> | 2015-10-06 17:26:34 +0000 |
commit | 506e0e90ff361577cfd8a282a2a96871db8c2fba (patch) | |
tree | e1bcfa217d4535acdbed49e8f7dd442b9088d594 /tests/main.vala | |
parent | 33ea309a98c63869031e0820365a193b9570c919 (diff) | |
parent | b5bb009d74753290d34ce34bea05a4b9b057cbef (diff) | |
download | ayatana-indicator-keyboard-506e0e90ff361577cfd8a282a2a96871db8c2fba.tar.gz ayatana-indicator-keyboard-506e0e90ff361577cfd8a282a2a96871db8c2fba.tar.bz2 ayatana-indicator-keyboard-506e0e90ff361577cfd8a282a2a96871db8c2fba.zip |
Manually set XDG_RUNTIME_DIR to fix the tests.
GLib 32492c6ab0000c50564360c74acf069814d942d1 unsets it after g_test_dbus_up () and g_test_dbus_down (). We need it so that spawned calls to the GSettings CLI tool knows what DBus socket to use.
Approved by: Sebastien Bacher
Diffstat (limited to 'tests/main.vala')
-rw-r--r-- | tests/main.vala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/main.vala b/tests/main.vala index dca3b8b2..e2782d1d 100644 --- a/tests/main.vala +++ b/tests/main.vala @@ -77,6 +77,8 @@ public class Tests : Object, Fixture { ((!) _bus).add_service_dir (SERVICE_DIR); ((!) _bus).up (); + Environment.set_variable ("XDG_RUNTIME_DIR", XDG_RUNTIME_DIR, true); + var loop = new MainLoop (null, false); _service_name = Bus.own_name (BusType.SESSION, @@ -130,6 +132,8 @@ public class Tests : Object, Fixture { if (_bus != null) { ((!) _bus).down (); _bus = null; + + Environment.set_variable ("XDG_RUNTIME_DIR", XDG_RUNTIME_DIR, true); } } |