on xenial help sign in
Updated upstart and autopilot test
436e253Andrea Cimitan
data/unity8.conf+1−2
@@ -12,7 +12,7 @@ respawn
12expect stop
12expect stop
13
13
14pre-start script
14pre-start script
15− # Tell unity-mir to raise SIGSTOP after we quit
15+ # Tell unity-mir to raise SIGSTOP after we start
16 initctl set-env UNITY_MIR_EXPECTS_SIGSTOP=1
16 initctl set-env UNITY_MIR_EXPECTS_SIGSTOP=1
17
17
18 if [ -n "$MIR_SOCKET" ]; then
18 if [ -n "$MIR_SOCKET" ]; then
@@ -50,7 +50,6 @@ end script
50exec ${BINARY:-unity8} $ARGS
50exec ${BINARY:-unity8} $ARGS
51
51
52post-stop script
52post-stop script
53− initctl unset-env UNITY_MIR_EXPECTS_SIGSTOP
54 initctl set-env --global MIR_SOCKET=$UNITY_MIR_SOCKET
53 initctl set-env --global MIR_SOCKET=$UNITY_MIR_SOCKET
55 initctl unset-env --global UNITY_MIR_SOCKET
54 initctl unset-env --global UNITY_MIR_SOCKET
56end script
55end script
tests/autopilot/unity8/shell/tests/test_upstart.py+2−2
@@ -82,7 +82,7 @@ class UpstartIntegrationTests(UnityTestCase):
82 ))
82 ))
83
83
84 def test_no_sigstop(self):
84 def test_no_sigstop(self):
85− self.patch_environment("UPSTART_JOB", "foo")
85+ self.patch_environment("UNITY_MIR_EXPECTS_SIGSTOP", "")
86 self._launch_unity()
86 self._launch_unity()
87 self._set_proxy()
87 self._set_proxy()
88
88
@@ -91,7 +91,7 @@ class UpstartIntegrationTests(UnityTestCase):
91 logger.debug("Unity loaded and ready.")
91 logger.debug("Unity loaded and ready.")
92
92
93 def test_expect_sigstop(self):
93 def test_expect_sigstop(self):
94− self.patch_environment("UPSTART_JOB", "unity8")
94+ self.patch_environment("UNITY_MIR_EXPECTS_SIGSTOP", "1")
95 self._launch_unity()
95 self._launch_unity()
96 self.assertThat(lambda: os.WIFSTOPPED(self._get_status()), Eventually(Equals(True)), "Unity8 should raise SIGSTOP when ready")
96 self.assertThat(lambda: os.WIFSTOPPED(self._get_status()), Eventually(Equals(True)), "Unity8 should raise SIGSTOP when ready")
97
97