on xenial help sign in
Set MIR environment properly when not starting with upstart, too.
ed31cb7Michał Sawicz
tests/autopilot/unity8/shell/tests/test_upstart.py+10
@@ -57,6 +57,16 @@ class UpstartIntegrationTests(UnityTestCase):
57
57
58 def _launch_unity(self):
58 def _launch_unity(self):
59 self.patch_environment("QT_LOAD_TESTABILITY", "1")
59 self.patch_environment("QT_LOAD_TESTABILITY", "1")
60+ try:
61+ self._patch_environment("MIR_SERVER_HOST_SOCKET",
62+ os.environ("MIR_SOCKET"))
63+ except KeyError:
64+ pass
65+ else:
66+ socket = os.path.join(os.getenv("XDG_RUNTIME_DIR", "/tmp"),
67+ "mir_socket")
68+ self._patch_environment("MIR_SERVER_FILE", socket)
69+
60 self.process = subprocess.Popen(
70 self.process = subprocess.Popen(
61 [get_binary_path()] + self.unity_geometry_args)
71 [get_binary_path()] + self.unity_geometry_args)
62
72