diff --git a/debian/changelog b/debian/changelog index 68f5383..1975ee5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ applauncherd (2.0.13) unstable; urgency=low * Fixes: NB#291039 - Integrated version of applauncherd is missing some important test cases + * Changes: testcases added/fixed for code coverage -- Thyagarajan Balakrishnan Tue, 22 Nov 2011 11:27:40 +0200 diff --git a/tests/harmattan/daemon-tests/tests.xml b/tests/harmattan/daemon-tests/tests.xml index 5eeffb1..66bdaab 100644 --- a/tests/harmattan/daemon-tests/tests.xml +++ b/tests/harmattan/daemon-tests/tests.xml @@ -70,6 +70,9 @@ source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-boot-mode.py test_SIGUSR1 + + source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-boot-mode.py test_SIGUSR2_AFTER_SIGUSR1 + true true diff --git a/tests/harmattan/functests/tests.xml b/tests/harmattan/functests/tests.xml index a21f4e7..3545979 100644 --- a/tests/harmattan/functests/tests.xml +++ b/tests/harmattan/functests/tests.xml @@ -240,7 +240,7 @@ - source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_argv_mbooster_over_limit + source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_argv_dbooster_over_limit diff --git a/tests/harmattan/testscripts/test-boot-mode.py b/tests/harmattan/testscripts/test-boot-mode.py index 0b27210..a7fc851 100644 --- a/tests/harmattan/testscripts/test-boot-mode.py +++ b/tests/harmattan/testscripts/test-boot-mode.py @@ -243,6 +243,26 @@ class BootModeTests(unittest.TestCase): debug("The log msg is %s" %op1) self.assert_(st1 == 0, "Seems that SIGUSR1 was not send") + def test_SIGUSR2_AFTER_SIGUSR1(self): + """ + send SIGUSR2 for applauncherd when it is NOT in boot mode. + This should turn it into boot mode. + """ + #Send SIGUSR1 to unset boot mode + daemon_pid = wait_for_single_applauncherd() + st, op = commands.getstatusoutput("kill -SIGUSR1 %s" %daemon_pid) + time.sleep(3) + st1, op1 = commands.getstatusoutput("grep '%s]: Daemon: Exited boot mode.' /var/log/syslog " %daemon_pid) + debug("The log msg is %s" %op1) + self.assert_(st1 == 0, "Seems that SIGUSR1 was not send") + + #send SIGUSR2 for applauncherd to switch into boot mode + st, op = commands.getstatusoutput("kill -SIGUSR2 %s" %daemon_pid) + time.sleep(3) + st1, op1 = commands.getstatusoutput("grep '%s]: Daemon: Entered boot mode.' /var/log/syslog " %daemon_pid) + debug("The log msg is %s" %op1) + self.assert_(st1 == 0, "Seems that SIGUSR2 was not send") + if __name__ == '__main__': # When run with testrunner, for some reason the PATH doesn't include