Changes: Signal forwarding tests added for q-booster and w-booster

RevBy: TrustMe
pull/1/head
Nimika Keshri 15 years ago
parent 6c59077919
commit 77de29cbff

@ -3,8 +3,7 @@ usr/share/applauncherd-testscripts/ts_prestartapp.rb
usr/share/applauncherd-testscripts/check_pipes.py usr/share/applauncherd-testscripts/check_pipes.py
usr/share/applauncherd-testscripts/test-perf-mbooster.py usr/share/applauncherd-testscripts/test-perf-mbooster.py
usr/share/applauncherd-testscripts/tc_theming.rb usr/share/applauncherd-testscripts/tc_theming.rb
usr/share/applauncherd-testscripts/fala_sf.sh
usr/share/applauncherd-testscripts/fala_sf.py
usr/share/applauncherd-testscripts/test-perf.rb usr/share/applauncherd-testscripts/test-perf.rb
usr/share/applauncherd-testscripts/utils.py usr/share/applauncherd-testscripts/utils.py
usr/share/applauncherd-testscripts/test-security.py usr/share/applauncherd-testscripts/test-security.py
usr/share/applauncherd-testscripts/signal-forward/*

@ -9,7 +9,7 @@ install(FILES
install(PROGRAMS install(PROGRAMS
ts_prestartapp.rb ts_prestartapp.rb
tc_theming.rb tc_theming.rb
fala_sf.py
fala_sf.sh
test-perf.rb test-perf.rb
DESTINATION /usr/share/applauncherd-testscripts) DESTINATION /usr/share/applauncherd-testscripts)
add_subdirectory (signal-forward)

@ -0,0 +1,3 @@
install(PROGRAMS fala_sf_m.sh fala_sf_wrt.sh fala_sf_qt.sh DESTINATION /usr/share/applauncherd-testscripts/signal-forward)
install(PROGRAMS fala_sf_m.py fala_sf_wrt.py fala_sf_qt.py DESTINATION /usr/share/applauncherd-testscripts/signal-forward)

@ -4,7 +4,7 @@ import time
import commands import commands
#Launching application from the script #Launching application from the script
os.system("/usr/share/applauncherd-testscripts/fala_sf.sh &") os.system("/usr/share/applauncherd-testscripts/signal-forward/fala_sf_m.sh &")
time.sleep(2) time.sleep(2)
st, op = commands.getstatusoutput("pgrep fala_ft_hello") st, op = commands.getstatusoutput("pgrep fala_ft_hello")

@ -0,0 +1,15 @@
#!/usr/bin/env python
import os
import time
import commands
#Launching application from the script
os.system("/usr/share/applauncherd-testscripts/signal-forward/fala_sf_qt.sh &")
time.sleep(3)
st, op = commands.getstatusoutput("pgrep fala_ft_hello")
#Killing application with a signal 11 (Segmentation Fault)
commands.getoutput("kill -6 %s" %op)
time.sleep(2)

@ -0,0 +1,3 @@
#!/bin/sh
su user -c 'invoker --type=qt --wait-term /usr/bin/fala_ft_hello.launch'

@ -0,0 +1,15 @@
#!/usr/bin/env python
import os
import time
import commands
#Launching application from the script
os.system("/usr/share/applauncherd-testscripts/signal-forward/fala_sf_wrt.sh &")
time.sleep(2)
st, op = commands.getstatusoutput("pgrep fala_ft_hello")
#Killing application with a signal 11 (Segmentation Fault)
commands.getoutput("kill -10 %s" %op)
time.sleep(2)

@ -0,0 +1,3 @@
#!/bin/sh
invoker --type=wrt --wait-term /usr/bin/fala_ft_hello.launch

@ -460,11 +460,28 @@ class launcher_tests (unittest.TestCase):
""" """
To test that invoker is killed by the same signal as the application To test that invoker is killed by the same signal as the application
""" """
#Test for m-booster
st, op = commands.getstatusoutput("/usr/share/applauncherd-testscripts/signal-forward/fala_sf_m.py")
print ("The Invoker killed by : %s" %op)
self.assert_(op == 'Segmentation fault (core dumped)', "The invoker(m-booster) was not killed by the same signal")
time.sleep(2)
#This case is launching the application in user mode
#Test for q-booster
st, op = commands.getstatusoutput("/usr/share/applauncherd-testscripts/signal-forward/fala_sf_qt.py")
print ("The Invoker killed by : %s" %op.split('\n')[3])
self.assert_(op.split('\n')[3] == 'Aborted (core dumped)', "The invoker(q-booster) was not killed by the same signal")
time.sleep(2)
st, op = commands.getstatusoutput("/usr/share/applauncherd-testscripts/fala_sf.py") #Test for w-booster
st, op = commands.getstatusoutput("/usr/share/applauncherd-testscripts/signal-forward/fala_sf_wrt.py")
print ("The Invoker killed by : %s" %op) print ("The Invoker killed by : %s" %op)
self.assert_(op == 'Segmentation fault (core dumped)', "The invoker was not killed by the same signal") self.assert_(op == 'User defined signal 1', "The invoker(w-booster) was not killed by the same signal")
time.sleep(2)
def test_020_launch_wo_applauncherd(self): def test_020_launch_wo_applauncherd(self):
""" """

Loading…
Cancel
Save