From 40fb65270f8404bb4411c272a411145a4d364f7d Mon Sep 17 00:00:00 2001 From: Thyagarajan Balakrishnan Date: Tue, 22 Nov 2011 11:23:35 +0200 Subject: [PATCH] Changes: test case fix for booster-m pid returned as None RevBy: Marek --- tests/harmattan/testscripts/test-boot-mode.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tests/harmattan/testscripts/test-boot-mode.py b/tests/harmattan/testscripts/test-boot-mode.py index 7a6f350..0b27210 100644 --- a/tests/harmattan/testscripts/test-boot-mode.py +++ b/tests/harmattan/testscripts/test-boot-mode.py @@ -109,22 +109,19 @@ class BootModeTests(unittest.TestCase): #self.start_applauncherd_in_boot_mode() # get booster pids in boot mode - pids = self.get_booster_pids() + oldBoosterPids = get_booster_pid() + self.assert_(all(oldBoosterPids), "atleast one of the boosters is not running") # send SIGUSR1 kill_process('applauncherd', signum=10) - wait_for_app('booster-q') - wait_for_app('booster-m') - - - # get booster pids in normal mode - pids2 = self.get_booster_pids() + newBoosterPids = get_booster_pid() # terminate applauncherd kill_process('applauncherd', signum=15) - self.assert_(pids[0] != pids2[0], "pid of booster-m didn't change") - self.assert_(pids[1] != pids2[1], "pid of booster-m didn't change") + self.assert_(all(newBoosterPids), "atleast one of the boosters is not running") + self.assert_(len(set(oldBoosterPids) & set(newBoosterPids)) == 0, + "atleast one of the boosters was not killed/restarted") def launch_apps(self, n = 6, btype = 'm'): # check that launching works and the apps are there