@@ -89,8 +89,7 @@ class UnityTestCase(AutopilotTestCase):
8989 "/sbin/initctl",
9090 "status",
9191 "unity8"
92− ],
93− stderr=subprocess.STDOUT)
92+ ], stderr=subprocess.STDOUT)
9493 except subprocess.CalledProcessError, e:
9594 sys.stderr.write(
9695 "Error: `initctl status unity8` failed, most probably the unity8 session could not be found:\n\n"
@@ -197,8 +196,7 @@ class UnityTestCase(AutopilotTestCase):
197196 "get-env",
198197 "--global",
199198 key
200− ],
201− stderr=subprocess.STDOUT).rstrip()
199+ ], stderr=subprocess.STDOUT).rstrip()
202200 except subprocess.CalledProcessError:
203201 current_value = None
204202
@@ -207,20 +205,20 @@ class UnityTestCase(AutopilotTestCase):
207205 "set-env",
208206 "--global",
209207 "%s=%s" % (key, value)
210− ])
208+ ], stderr=subprocess.STDOUT)
211209 self.addCleanup(self._upstart_reset_env, key, current_value)
212210
213211 def _upstart_reset_env(self, key, value):
214212 logger.info("Resetting upstart env %s to %s", key, value)
215213 if value is None:
216− subprocess.call(["/sbin/initctl", "unset-env", key])
214+ subprocess.call(["/sbin/initctl", "unset-env", key], stderr=subprocess.STDOUT)
217215 else:
218216 subprocess.call([
219217 "/sbin/initctl",
220218 "set-env",
221219 "--global",
222220 "%s=%s" % (key, value)
223− ])
221+ ], stderr=subprocess.STDOUT)
224222
225223 def launch_unity(self, **kwargs):
226224 """Launch the unity shell, return a proxy object for it."""
@@ -276,7 +274,7 @@ class UnityTestCase(AutopilotTestCase):
276274 "unity8",
277275 binary_arg,
278276 extra_args,
279− ])
277+ ], stderr=subprocess.STDOUT)
280278
281279 self.addCleanup(self._cleanup_launching_upstart_unity)
282280
@@ -292,20 +290,20 @@ class UnityTestCase(AutopilotTestCase):
292290
293291 # FIXME: Workaround for issue: lp:1239491
294292 if model() != "Desktop":
293+ logger.info("Stopping maliit-server before unity.")
295294 try:
296− logger.info("Stopping maliit-server before unity.")
297295 subprocess.check_call([
298296 "/sbin/initctl",
299297 "stop",
300298 "maliit-server"
301− ])
299+ ], stderr=subprocess.STDOUT)
302300 except subprocess.CalledProcessError:
303301 logger.warning(
304302 "Appears that maliit-server was already stopped!"
305303 )
306304
305+ logger.info("Stopping unity")
307306 try:
308− logger.info("Stopping unity")
309307 subprocess.check_call(["/sbin/initctl", "stop", "unity8"], stderr=subprocess.STDOUT)
310308 except subprocess.CalledProcessError:
311309 logger.warning("Appears unity was already stopped!")