on xenial help sign in
Make sure maliit-server doesn't break 'stopping unity8' and ensure it's running for 'starting unity8'
commit441f0b0d274d0da70b8b503719a55f28867386a1 authorChristopher Lee <chris.lee@canonical.com> dateMon 14 Oct 2013, 14:19 (13 years ago) parent0acd7aa
1 file changed+16
tests/autopilot/unity8/shell/tests/__init__.py+16
tests/autopilot/unity8/shell/tests/__init__.py+16
@@ -294,12 +294,28 @@ class UnityTestCase(AutopilotTestCase):
294294 logger.info("Cleaning up launching unity")
295295 subprocess.call(["/sbin/initctl", "unset-env", "QT_LOAD_TESTABILITY"])
296296
297+ if model() != "Desktop":
298+ try:
299+ logger.info("Stopping maliit-server before unity.")
300+ subprocess.check_call(["/sbin/initctl", "stop", "maliit-server"])
301+ except subprocess.CalledProcessError:
302+ logger.warning("Appears that maliit-server was already stopped!")
303+
297304 try:
298305 logger.info("Stopping unity")
299306 subprocess.check_call(["/sbin/initctl", "stop", "unity8"])
300307 except subprocess.CalledProcessError:
301308 logger.warning("Appears unity was already stopped!")
302309
310+
311+ if model() != "Desktop":
312+ try:
313+ logger.info("Starting maliit-server again.")
314+ subprocess.check_call(["/sbin/initctl", "start", "maliit-server"])
315+ except subprocess.CalledProcessError as e:
316+ e.args += ("Failed to restart maliit-server.", )
317+ raise
318+
303319 def patch_lightdm_mock(self, mock_type='single'):
304320 self._lightdm_mock_type = mock_type
305321 logger.info("Setting up LightDM mock type '%s'", mock_type)