diff --git a/tests/Harmattan/TestScripts/test-func-launcher.py b/tests/Harmattan/TestScripts/test-func-launcher.py index 7a403b4..10b491d 100644 --- a/tests/Harmattan/TestScripts/test-func-launcher.py +++ b/tests/Harmattan/TestScripts/test-func-launcher.py @@ -74,6 +74,12 @@ def check_prerequisites(): class launcher_tests (unittest.TestCase): def setUp(self): + if get_pid('applauncherd') == None: + os.system('initctl start xsession/applauncherd') + time.sleep(5) + get_pid('booster-m') + get_pid('booster-q') + get_pid('booster-d') #setup here debug("Executing SetUp") @@ -83,6 +89,9 @@ class launcher_tests (unittest.TestCase): if get_pid('applauncherd') == None: os.system('initctl start xsession/applauncherd') time.sleep(5) + get_pid('booster-m') + get_pid('booster-q') + get_pid('booster-d') #Testcases def test_launcher_exist(self): diff --git a/tests/Harmattan/TestScripts/test-security.py b/tests/Harmattan/TestScripts/test-security.py index f3eb477..52df342 100644 --- a/tests/Harmattan/TestScripts/test-security.py +++ b/tests/Harmattan/TestScripts/test-security.py @@ -19,6 +19,28 @@ import unittest from utils import * class SecurityTests(unittest.TestCase): + + def setUp(self): + if get_pid('applauncherd') == None: + os.system('initctl start xsession/applauncherd') + time.sleep(5) + get_pid('booster-m') + get_pid('booster-q') + get_pid('booster-d') + #setup here + debug("Executing SetUp") + + def tearDown(self): + #teardown here + debug("Executing TearDown") + if get_pid('applauncherd') == None: + os.system('initctl start xsession/applauncherd') + time.sleep(5) + get_pid('booster-m') + get_pid('booster-q') + get_pid('booster-d') + + #Testcases def filter_creds(self, creds): """ Filter out some unnecessary cruft from the test point of view diff --git a/tests/Harmattan/TestScripts/test-single-instance.py b/tests/Harmattan/TestScripts/test-single-instance.py index ac8a570..e032c28 100644 --- a/tests/Harmattan/TestScripts/test-single-instance.py +++ b/tests/Harmattan/TestScripts/test-single-instance.py @@ -55,6 +55,28 @@ def check_prerequisites(): "You probably want to source /tmp/session_bus_address.user") class SingleInstanceTests(unittest.TestCase): + + def setUp(self): + if get_pid('applauncherd') == None: + os.system('initctl start xsession/applauncherd') + time.sleep(5) + get_pid('booster-m') + get_pid('booster-q') + get_pid('booster-d') + #setup here + debug("Executing SetUp") + + def tearDown(self): + #teardown here + debug("Executing TearDown") + if get_pid('applauncherd') == None: + os.system('initctl start xsession/applauncherd') + time.sleep(5) + get_pid('booster-m') + get_pid('booster-q') + get_pid('booster-d') + + #Testcases def minimize(self, pid): # get window id st, op = commands.getstatusoutput('fala_windowid %s' % pid) @@ -271,7 +293,7 @@ if __name__ == '__main__': restart_applauncherd() - time.sleep(3) + time.sleep(5) tests = sys.argv[1:] diff --git a/tests/Harmattan/TestScripts/utils.py b/tests/Harmattan/TestScripts/utils.py index d6ec542..18e4224 100644 --- a/tests/Harmattan/TestScripts/utils.py +++ b/tests/Harmattan/TestScripts/utils.py @@ -45,6 +45,7 @@ def start_applauncherd(): stdout = DEV_NULL, stderr = DEV_NULL, shell = False) + time.sleep(4) return handle.wait() == 0 def stop_applauncherd():