Changes: Test for relative path search added

RevBy: TrustMe
pull/1/head
Nimika Keshri 15 years ago
parent c3cba0a91e
commit 019af9c3e1

@ -174,6 +174,9 @@
<case name="applauncherd__test_invoker_wait_term" type="Functional" description="Test that invoker waits for the application to exit" timeout="360" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_invoker_wait_term</step>
</case>
<case name="applauncherd__test_relative_path_search" type="Functional" description="Test that invoker searches the application through relative path" timeout="360" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-invoker.py test_relative_path_search</step>
</case>
<environments>
<scratchbox>true</scratchbox>
<hardware>true</hardware>

@ -7,12 +7,8 @@ import commands
os.system("/usr/share/applauncherd-testscripts/signal-forward/fala_sf_m.sh &")
time.sleep(2)
st, op = commands.getstatusoutput("ps ax | grep fala_ft_hello")
if op.split("\n")[1].find("invoker") != -1:
op = op.split("\n")[1].split(" ")[0]
else:
print("The Application was not launched by invoker")
exit
st, op = commands.getstatusoutput("ps ax | grep fala_ft_hello | grep invoker")
op = op.split("\n")[0].split(" ")[0]
#Killing application with a signal 11 (Segmentation Fault)
commands.getoutput("kill -11 %s" %op)

@ -128,7 +128,7 @@ class InvokerTests(unittest.TestCase):
kill_process("fala_wl")
self.assert_(pid != None ,"The application was not launched")
def test_app_directory_file(self):
def test_app_directory(self):
"""
Test that invoker is unable to launch a application which is a directory
"""
@ -179,6 +179,16 @@ class InvokerTests(unittest.TestCase):
debug("terminating fala_wait ...")
self.assert_(success, "invoker terminated before delay elapsed")
def test_relative_path_search(self):
"""
Test that invoker searches the application through relative path
"""
os.system("(cd /usr;export PATH=bin;/usr/bin/invoker --type=m fala_wl&)")
pid = get_pid("fala_wl")
kill_process("fala_wl")
self.assert_(pid != None ,"The application was not launched")
# main

Loading…
Cancel
Save