on xenial help sign in
Remove the mir socket before starting unity8 during autopilot tests.

Approved by Michael Terry.

commite4a75c608bc633e11da8223aebc91d79a502b086 authorMichał Sawicz <michal.sawicz@canonical.com> dateWed 9 Oct 2013, 23:17 (13 years ago) parent11b8d329af4407
1 file changed+11
tests/autopilot/unity8/shell/tests/__init__.py+11
tests/autopilot/unity8/shell/tests/__init__.py+11
@@ -164,6 +164,17 @@ class UnityTestCase(AutopilotTestCase):
164164 if self._qml_mock_enabled:
165165 self._setup_extra_mock_environment_patch()
166166
167+ # FIXME: we shouldn't be doing this
168+ # $MIR_SOCKET, fallback to $XDG_RUNTIME_DIR/mir_socket and /tmp/mir_socket as last resort
169+ try:
170+ os.unlink(os.getenv('MIR_SOCKET', os.path.join(os.getenv('XDG_RUNTIME_DIR', "/tmp"), "mir_socket")))
171+ except OSError:
172+ pass
173+ try:
174+ os.unlink("/tmp/mir_socket")
175+ except OSError:
176+ pass
177+
167178 app_proxy = self.launch_test_application(
168179 binary_path,
169180 *self.unity_geometry_args,