diff options
author | William Hua <william.hua@canonical.com> | 2015-10-05 14:13:43 -0400 |
---|---|---|
committer | William Hua <william.hua@canonical.com> | 2015-10-05 14:13:43 -0400 |
commit | 568a977ebea54e30074d7f99e7e85306da2482df (patch) | |
tree | 7aeeee987f06411e3b44854265b332daf371ad52 /tests | |
parent | 99ca1ad413bc1ad7574da45b90546ebfa1d2aa93 (diff) | |
download | ayatana-indicator-keyboard-568a977ebea54e30074d7f99e7e85306da2482df.tar.gz ayatana-indicator-keyboard-568a977ebea54e30074d7f99e7e85306da2482df.tar.bz2 ayatana-indicator-keyboard-568a977ebea54e30074d7f99e7e85306da2482df.zip |
Manually set XDG_RUNTIME_DIR.
GLib 32492c6ab0000c50564360c74acf069814d942d1 resets it after calling TestDBus.up () and TestDBus.down ().
Diffstat (limited to 'tests')
-rw-r--r-- | tests/config.vala.in | 1 | ||||
-rw-r--r-- | tests/main.vala | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/config.vala.in b/tests/config.vala.in index 7acae9de..ef533d33 100644 --- a/tests/config.vala.in +++ b/tests/config.vala.in @@ -1,2 +1,3 @@ const string DCONF_PROFILE = "@abs_top_builddir@/tests/profiles/indicator-keyboard-test"; const string SERVICE_DIR = "@abs_top_builddir@/tests/services"; +const string XDG_RUNTIME_DIR = "@abs_top_builddir@/tests"; 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); } } |