@ -51,7 +51,6 @@ LAUNCHABLE_APPS = ['/usr/bin/fala_ft_hello','/usr/bin/fala_ft_hello1', '/usr/bin
LAUNCHABLE_APPS_QML = [ ' /usr/bin/fala_qml_helloworld ' , ' /usr/bin/fala_qml_helloworld1 ' , ' /usr/bin/fala_qml_helloworld2 ' ]
PREFERED_APP = ' /usr/bin/fala_ft_hello '
PREFERED_APP_QML = ' /usr/bin/fala_qml_helloworld '
DAEMONS_TO_BE_STOPPED = [ ' xsession/applifed ' , ' xsession/conndlgs ' ]
using_scratchbox = False
@ -73,17 +72,6 @@ def check_prerequisites():
for app in LAUNCHABLE_APPS :
assert len ( basename ( app ) ) < = 15 , " For app: %s , base name !<= 14 " % app
# Function to stop desired daemons. This is also done in setup function
# if stop_daemons is not called before.
def stop_daemons ( ) :
for daemon in DAEMONS_TO_BE_STOPPED :
os . system ( ' initctl stop %s ' % ( daemon ) )
# Function to start desired daemons. This is also done in teardown function
# if start_daemons is not called before.
def start_daemons ( ) :
for daemon in DAEMONS_TO_BE_STOPPED :
os . system ( ' initctl start %s ' % ( daemon ) )
class daemon_handling ( unittest . TestCase ) :
@ -96,15 +84,12 @@ class daemon_handling (unittest.TestCase):
class launcher_tests ( unittest . TestCase ) :
def setUp ( self ) :
# Check if first of the desired daemons is running, and if so, start those all
st , op = commands . getstatusoutput ( ' pgrep %s ' % DAEMONS_TO_BE_STOPPED [ 0 ] . split ( " / " ) [ 1 ] )
if st == 0 :
if daemons_running ( ) :
stop_daemons ( )
self . START_DAEMONS_AT_TEARDOWN = True
else :
self . START_DAEMONS_AT_TEARDOWN = False
if get_pid ( ' applauncherd ' ) == None :
os . system ( ' initctl start xsession/applauncherd ' )
time . sleep ( 5 )
@ -120,9 +105,10 @@ class launcher_tests (unittest.TestCase):
if get_pid ( ' applauncherd ' ) == None :
os . system ( ' initctl start xsession/applauncherd ' )
time . sleep ( 5 )
debug ( " START_DAEMONS_AT_TEARDOWN: %s " % self . START_DAEMONS_AT_TEARDOWN )
if self . START_DAEMONS_AT_TEARDOWN :
start_daemons ( )
get_pid ( ' booster-m ' )
get_pid ( ' booster-q ' )
get_pid ( ' booster-d ' )