Changes: Fixed test_004 to kill apps even on failure

pull/1/head
Oskari Timperi 15 years ago
parent cdf545c1d1
commit 74235e12cc

@ -286,20 +286,24 @@ class launcher_tests (unittest.TestCase):
""" """
To test that more than one applications are launched by the launcher To test that more than one applications are launched by the launcher
""" """
def kill_launched(pids):
for pid in pids:
self.kill_process(apppid = pid)
pidlist = [] pidlist = []
for app in LAUNCHABLE_APPS: for app in LAUNCHABLE_APPS:
#launch application with launcher p = self.run_app_with_launcher(app)
#check if the application is running pid = self.wait_for_app(app, timeout = 10, sleep = 1)
#check if p.pid is same as pgrep appname
#in a global dictionary, append the pid if pid == None:
process_handle = self.run_app_with_launcher(app) kill_launched(pidlist)
time.sleep(5) self.fail("%s was not launched using applauncherd")
process_id = self.get_pid(app)
pidlist.append(process_id) pidlist.append(pid)
self.assert_(not (process_id == None), "All Applications were not launched using launcher")
for pid in pidlist:
self.kill_process(apppid=pid)
kill_launched(pidlist)
def test_005_one_instance(self): def test_005_one_instance(self):
""" """

Loading…
Cancel
Save