Changes: Checks for applauncherd in setup and teardown of tests

RevBy: TrustMe
pull/1/head
Nimika Keshri 15 years ago
parent 856f65c04d
commit 0bc288ee04

@ -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):

@ -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

@ -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:]

@ -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():

Loading…
Cancel
Save