Changes: updated invalid test cases in func-tests and removed 1 invalid test case in daemon-tests

RevBy: Dmitry Rozenshtein
pull/1/head
Thyagarajan Balakrishnan 14 years ago
parent d125dff088
commit cf8e3bdda4

1
debian/changelog vendored

@ -1,6 +1,7 @@
applauncherd (2.0.6) unstable; urgency=low
* Changes: test fixed test_launched_app_wm_class_m
* Changes: updated invalid test cases in func-tests and removed 1 invalid test case in daemon-tests
-- Thyagarajan Balakrishnan <ext-thyagarajan.1.balakrishnan@nokia.com> Fri, 14 Oct 2011 14:40:32 +0300

@ -16,10 +16,6 @@
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-daemons.py test_launcher_exist</step>
</case>
<case name="applauncherd__test_daemon_list" type="Functional" description="To list the running daemons using invoker after boot" 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-daemons.py test_daemon_list</step>
</case>
<case name="applauncherd__test_daemon_second_instance" type="Functional" description="Test that 2nd instance of daemon cannot be started" 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-daemons.py test_daemon_second_instance </step>
</case>

@ -166,6 +166,10 @@
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="applauncherd__test_zombie_state_q" type="Functional" description="To test that no Zombie process exist after the application is killed" 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_zombie_state_q</step>
</case>
<case name="applauncherd__test_fd_booster_q" type="Functional" description="File descriptor test for booster-q" timeout="560" 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_fd_booster_q</step>
</case>
@ -174,6 +178,10 @@
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_dirPath_filePath_q</step>
</case>
<case name="applauncherd__test_qttas_load_booster_q" type="Functional" description="To test invoker that qttestability plugin is loaded with -testability argument for booster-q" 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_qttas_load_booster_q</step>
</case>
<environments>
<scratchbox>false</scratchbox>
<hardware>true</hardware>
@ -195,10 +203,6 @@
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_launch_multiple_apps_qml</step>
</case>
<case name="applauncherd__test_one_instance_qml" type="Functional" description="To test that only one instance of a application exist" 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_one_instance_qml</step>
</case>
<case name="applauncherd__test_launch_multiple_apps_cont_qml" type="Functional" description="To test that more than one applications are launched by the launcher" 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_launch_multiple_apps_cont_qml</step>
</case>
@ -260,10 +264,6 @@
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_launch_multiple_apps_e</step>
</case>
<case name="applauncherd__test_one_instance_e" type="Functional" description="To test that only one instance of a application exist" 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_one_instance_e</step>
</case>
<case name="applauncherd__test_fd_booster_e" type="Functional" description="File descriptor test for booster-d" timeout="560" 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_fd_booster_e</step>
</case>

@ -52,16 +52,6 @@ class DaemonTests(unittest.TestCase):
self.sighup_applauncherd()
self.test_launcher_exist(False)
def test_daemon_list(self):
"""
To List the daemons running using invoker after boot
"""
st, op = commands.getstatusoutput("ps ax | grep invoker")
count = len(op.split("\n"))
for i in xrange(count-2):
if op.split("\n")[i].find("prestart") == -1:
debug("%s" %op.split("\n")[i])
def test_daemon(self):
"""
Test that the --daemon parameter works for applauncherd

@ -142,6 +142,9 @@ class launcher_tests (unittest.TestCase):
def test_zombie_state_qml(self):
self._test_zombie_state(PREFERED_APP_QML,'d')
def test_zombie_state_q(self):
self._test_zombie_state(PREFERED_APP,'q')
def test_zombie_state_e(self):
self._test_zombie_state(PREFERED_APP, 'e')
@ -167,11 +170,11 @@ class launcher_tests (unittest.TestCase):
kill_process(prefered_app)
time.sleep(4)
process_id1 = get_pid(prefered_app)
process_id2 = get_pid(prefered_app)
debug("The pid of %s id %s" %(prefered_app, process_id1))
self.assert_(process_id != process_id1 , "New Process not launched")
self.assert_(process_id1 == None , "Process still running")
self.assert_(process_id != process_id1 , "New Process not launched (zombie exists)")
self.assert_(process_id2 == None , "Process still running")
if(sighup):
self.sighup_applauncherd()
self._test_zombie_state(prefered_app, btype, False)
@ -214,12 +217,6 @@ class launcher_tests (unittest.TestCase):
def test_one_instance_m(self):
self._test_one_instance(PREFERED_APP, 'm')
def test_one_instance_qml(self):
self._test_one_instance(PREFERED_APP_QML, 'd')
def test_one_instance_e(self):
self._test_one_instance(PREFERED_APP, 'e')
def _test_one_instance(self, prefered_app, btype, sighup = True):
"""
To test that only one instance of a application exist
@ -234,16 +231,16 @@ class launcher_tests (unittest.TestCase):
process_handle = run_app_as_user_with_invoker(prefered_app, booster=btype)
process_id = wait_for_app(prefered_app)
debug("PID of first %s" % process_id)
time.sleep(3)
process_handle1 = run_app_as_user_with_invoker(prefered_app, booster=btype)
time.sleep(3)
process_id = wait_for_app(prefered_app)
debug("PID of 2nd %s" % process_id)
process_id1 = wait_for_app(prefered_app)
debug("PID of 2nd %s" % process_id1)
st, pids = commands.getstatusoutput("pgrep %s" % prefered_app) #get all pids of the app
kill_process(prefered_app)
self.assert_( len(process_id.split(' ')) == 1, "Only one instance of app not running")
self.assert_( len(pids.split()) == 1, "Only one instance of app not running")
if(sighup):
self.sighup_applauncherd()
self._test_one_instance(prefered_app, btype, False)
@ -632,32 +629,34 @@ class launcher_tests (unittest.TestCase):
def test_unix_signal_handlers(self, sighup = True):
"""
Test unixSignalHandlers by killing booster-m and booster-d, signal hup
Test unixSignalHandlers by killing booster-m,d,q,e with signal hup
"""
mpid = get_pid('booster-m')
st, op = commands.getstatusoutput('kill -hup %s' % mpid)
time.sleep(2)
mpid_new = wait_for_app('booster-m')
self.assert_(mpid != mpid_new, "booster-m pid is not changed")
dpid = get_pid('booster-d')
st, op = commands.getstatusoutput('kill -hup %s' % dpid)
time.sleep(2)
dpid_new = wait_for_app('booster-d')
self.assert_(dpid != dpid_new, "booster-d pid is not changed")
self._test_sighup_booster('m')
self._test_sighup_booster('d')
self._test_sighup_booster('q')
self._test_sighup_booster('e')
if(sighup):
self.sighup_applauncherd()
self.test_unix_signal_handlers(False)
def _test_sighup_booster(self, btype):
pid = get_pid('booster-%s' % btype)
st, op = commands.getstatusoutput('kill -hup %s' % pid)
time.sleep(2)
pid_new = wait_for_app('booster-%s' % btype)
self.assert_(pid != pid_new, "booster-%s pid is not changed" % btype)
def test_qttas_load_booster_d(self):
self._test_qttas_load_booster(PREFERED_APP_QML, 'd')
def test_qttas_load_booster_m(self):
self._test_qttas_load_booster(PREFERED_APP, 'm')
def test_qttas_load_booster_q(self):
self._test_qttas_load_booster(PREFERED_APP, 'q')
def _test_qttas_load_booster(self, testapp, btype, sighup = True):
"""
To test invoker that qttestability plugin is loaded with -testability argument for booster-d

Loading…
Cancel
Save