Merge lp:~attente/indicator-keyboard/manually-set-xdg-runtime-dir into lp:indicator-keyboard

Proposed by William Hua
Status: Merged
Approved by: Sebastien Bacher
Approved revision: 877
Merged at revision: 878
Proposed branch: lp:~attente/indicator-keyboard/manually-set-xdg-runtime-dir
Merge into: lp:indicator-keyboard
Diff against target: 83 lines (+11/-6)
4 files modified
po/Makefile.in.in (+5/-6)
tests/config.vala.in (+1/-0)
tests/indicator-keyboard-test.in (+1/-0)
tests/main.vala (+4/-0)
To merge this branch: bzr merge lp:~attente/indicator-keyboard/manually-set-xdg-runtime-dir
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Sebastien Bacher Approve
Review via email: mp+273451@code.launchpad.net

Commit message

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.

Description of the change

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.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
877. By William Hua

Manually set GDK_BACKEND=x11.

GDK wants to try Wayland first, which causes indicator-keyboard-service to fail if XDG_RUNTIME_DIR is longer than 108 characters.

Revision history for this message
Sebastien Bacher (seb128) wrote :

that does the trick, thanks

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'po/Makefile.in.in'
2--- po/Makefile.in.in 2013-06-10 13:41:00 +0000
3+++ po/Makefile.in.in 2015-10-06 16:57:32 +0000
4@@ -33,8 +33,7 @@
5 datadir = @datadir@
6 datarootdir = @datarootdir@
7 libdir = @libdir@
8-DATADIRNAME = @DATADIRNAME@
9-itlocaledir = $(prefix)/$(DATADIRNAME)/locale
10+localedir = @localedir@
11 subdir = po
12 install_sh = @install_sh@
13 # Automake >= 1.8 provides @mkdir_p@.
14@@ -80,7 +79,7 @@
15
16 .po.pox:
17 $(MAKE) $(GETTEXT_PACKAGE).pot
18- $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
19+ $(MSGMERGE) $* $(GETTEXT_PACKAGE).pot -o $*.pox
20
21 .po.mo:
22 $(INTLTOOL_V_MSGFMT)$(MSGFMT) -o $@ $<
23@@ -108,7 +107,7 @@
24 install-data-yes: all
25 linguas="$(USE_LINGUAS)"; \
26 for lang in $$linguas; do \
27- dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
28+ dir=$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \
29 $(mkdir_p) $$dir; \
30 if test -r $$lang.gmo; then \
31 $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
32@@ -142,8 +141,8 @@
33 uninstall:
34 linguas="$(USE_LINGUAS)"; \
35 for lang in $$linguas; do \
36- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
37- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
38+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
39+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
40 done
41
42 check: all $(GETTEXT_PACKAGE).pot
43
44=== modified file 'tests/config.vala.in'
45--- tests/config.vala.in 2013-06-27 05:04:55 +0000
46+++ tests/config.vala.in 2015-10-06 16:57:32 +0000
47@@ -1,2 +1,3 @@
48 const string DCONF_PROFILE = "@abs_top_builddir@/tests/profiles/indicator-keyboard-test";
49 const string SERVICE_DIR = "@abs_top_builddir@/tests/services";
50+const string XDG_RUNTIME_DIR = "@abs_top_builddir@/tests";
51
52=== modified file 'tests/indicator-keyboard-test.in'
53--- tests/indicator-keyboard-test.in 2014-06-16 17:03:40 +0000
54+++ tests/indicator-keyboard-test.in 2015-10-06 16:57:32 +0000
55@@ -5,6 +5,7 @@
56 export GSETTINGS_SCHEMA_DIR="@abs_top_builddir@/data"
57 export XDG_RUNTIME_DIR="@abs_top_builddir@/tests"
58 export GTK_IM_MODULE="ibus"
59+export GDK_BACKEND="x11"
60
61 if xvfb-run -a ./indicator-keyboard-tests
62 then
63
64=== modified file 'tests/main.vala'
65--- tests/main.vala 2014-02-19 15:09:16 +0000
66+++ tests/main.vala 2015-10-06 16:57:32 +0000
67@@ -77,6 +77,8 @@
68 ((!) _bus).add_service_dir (SERVICE_DIR);
69 ((!) _bus).up ();
70
71+ Environment.set_variable ("XDG_RUNTIME_DIR", XDG_RUNTIME_DIR, true);
72+
73 var loop = new MainLoop (null, false);
74
75 _service_name = Bus.own_name (BusType.SESSION,
76@@ -130,6 +132,8 @@
77 if (_bus != null) {
78 ((!) _bus).down ();
79 _bus = null;
80+
81+ Environment.set_variable ("XDG_RUNTIME_DIR", XDG_RUNTIME_DIR, true);
82 }
83 }
84

Subscribers

People subscribed via source and target branches

to all changes: