Changes: testcases added/fixed for code coverage

RevBy: Thyagarajan Balakrishnan
pull/1/head
Dmitry Rozenshtein 14 years ago
parent 25506d79b9
commit 7a9b4645b1

1
debian/changelog vendored

@ -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 <ext-thyagarajan.1.balarishnan@nokia.com> Tue, 22 Nov 2011 11:27:40 +0200

@ -70,6 +70,9 @@
<case name="applauncherd__test_SIGUSR1" type="Functional" description="Test for SIGUSR1" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-boot-mode.py test_SIGUSR1 </step>
</case>
<case name="applauncherd__test_SIGUSR2_AFTER_SIGUSR1" type="Functional" description="Test for SIGUSR2 after SIGUSR1" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-boot-mode.py test_SIGUSR2_AFTER_SIGUSR1 </step>
</case>
<environments>
<scratchbox>true</scratchbox>
<hardware>true</hardware>

@ -240,7 +240,7 @@
</case>
<case name="applauncherd__test_argv_dbooster_over_limit" type="Functional" description="Test that extra arguments than ARGV_LIMIT are ignored " timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_argv_mbooster_over_limit </step>
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_argv_dbooster_over_limit </step>
</case>
<case name="applauncherd__test_dirPath_filePath_d" type="Functional" description="Test that correct file path and dir path is passed by booster d" timeout="360" level="System" insignificant="false">

@ -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

Loading…
Cancel
Save