on xenial help sign in
Fix expect-sigstop enviroment variable name. Fixes: 1346819
1d7c1a3Michał Sawicz
src/main.cpp+1−1
@@ -221,7 +221,7 @@ int main(int argc, const char *argv[])
221
221
222 return runWithClient(mirServer, startShell);
222 return runWithClient(mirServer, startShell);
223 } else {
223 } else {
224− if (qgetenv("UPSTART_JOB") == "unity8") {
224+ if (!qgetenv("UNITY_MIR_EMITS_SIGSTOP").isEmpty()) {
225 // Emit SIGSTOP as expected by upstart, under Mir it's unity-mir that will raise it.
225 // Emit SIGSTOP as expected by upstart, under Mir it's unity-mir that will raise it.
226 // see http://upstart.ubuntu.com/cookbook/#expect-stop
226 // see http://upstart.ubuntu.com/cookbook/#expect-stop
227 raise(SIGSTOP);
227 raise(SIGSTOP);
tests/autopilot/unity8/shell/emulators/dash.py+2−2
@@ -129,9 +129,9 @@ class Dash(emulators.UnityEmulatorBase):
129 def enter_search_query(self, query):
129 def enter_search_query(self, query):
130 current_header = self._get_current_page_header()
130 current_header = self._get_current_page_header()
131 self.pointing_device.move(current_header.globalRect.x +
131 self.pointing_device.move(current_header.globalRect.x +
132− current_header.width - current_header.height / 2,
132+ current_header.width - current_header.height / 4,
133 current_header.globalRect.y +
133 current_header.globalRect.y +
134− current_header.height / 2)
134+ current_header.height / 4)
135 self.pointing_device.click()
135 self.pointing_device.click()
136 headerContainer = current_header.select_single(objectName="headerContainer")
136 headerContainer = current_header.select_single(objectName="headerContainer")
137 headerContainer.contentY.wait_for(0)
137 headerContainer.contentY.wait_for(0)
tests/autopilot/unity8/shell/tests/test_upstart.py+13
@@ -20,6 +20,7 @@
20"""Tests for upstart integration."""
20"""Tests for upstart integration."""
21
21
22import os
22import os
23+import stat
23import signal
24import signal
24import subprocess
25import subprocess
25import time
26import time
@@ -57,6 +58,18 @@ class UpstartIntegrationTests(UnityTestCase):
57
58
58 def _launch_unity(self):
59 def _launch_unity(self):
59 self.patch_environment("QT_LOAD_TESTABILITY", "1")
60 self.patch_environment("QT_LOAD_TESTABILITY", "1")
61+
62+ try:
63+ host_socket = os.getenv("MIR_SOCKET", "/run/mir_socket")
64+ if stat.S_ISSOCK(os.stat(host_socket).st_mode):
65+ self.patch_environment("MIR_SERVER_HOST_SOCKET",
66+ host_socket)
67+ socket = os.path.join(os.getenv("XDG_RUNTIME_DIR", "/tmp"),
68+ "mir_socket")
69+ self.patch_environment("MIR_SERVER_FILE", socket)
70+ except OSError:
71+ pass
72+
60 self.process = subprocess.Popen(
73 self.process = subprocess.Popen(
61 [get_binary_path()] + self.unity_geometry_args)
74 [get_binary_path()] + self.unity_geometry_args)
62
75