on xenial help sign in
Fix expect-sigstop enviroment variable name. Fixes: 1346819

Approved by: Leo Arias, PS Jenkins bot, Albert Astals Cid

commit1d7c1a32a21231342db2e4f4e44278ae99227074 authorMichał Sawicz <michal.sawicz@canonical.com> dateThu 24 Jul 2014, 20:40 (12 years ago) parent60970942bcb591
3 files changed+16−3
src/main.cpp+1−1 tests/autopilot/unity8/shell/emulators/dash.py+2−2 tests/autopilot/unity8/shell/tests/test_upstart.py+13
src/main.cpp+1−1
@@ -221,7 +221,7 @@ int main(int argc, const char *argv[])
221221
222222 return runWithClient(mirServer, startShell);
223223 } else {
224− if (qgetenv("UPSTART_JOB") == "unity8") {
224+ if (!qgetenv("UNITY_MIR_EMITS_SIGSTOP").isEmpty()) {
225225 // Emit SIGSTOP as expected by upstart, under Mir it's unity-mir that will raise it.
226226 // see http://upstart.ubuntu.com/cookbook/#expect-stop
227227 raise(SIGSTOP);
tests/autopilot/unity8/shell/emulators/dash.py+2−2
@@ -129,9 +129,9 @@ class Dash(emulators.UnityEmulatorBase):
129129 def enter_search_query(self, query):
130130 current_header = self._get_current_page_header()
131131 self.pointing_device.move(current_header.globalRect.x +
132− current_header.width - current_header.height / 2,
132+ current_header.width - current_header.height / 4,
133133 current_header.globalRect.y +
134− current_header.height / 2)
134+ current_header.height / 4)
135135 self.pointing_device.click()
136136 headerContainer = current_header.select_single(objectName="headerContainer")
137137 headerContainer.contentY.wait_for(0)
tests/autopilot/unity8/shell/tests/test_upstart.py+13
@@ -20,6 +20,7 @@
2020"""Tests for upstart integration."""
2121
2222import os
23+import stat
2324import signal
2425import subprocess
2526import time
@@ -57,6 +58,18 @@ class UpstartIntegrationTests(UnityTestCase):
5758
5859 def _launch_unity(self):
5960 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+
6073 self.process = subprocess.Popen(
6174 [get_binary_path()] + self.unity_geometry_args)
6275