#NEWLINE# def setup( self , context ) : #NEWLINE# #INDENT# self . logger . debug ( 'Creating script {}' . format ( self . host_script_file ) ) #NEWLINE# with open ( self . host_script_file , 'w' ) as wfh : #NEWLINE# #INDENT# env = jinja2 . Environment ( loader = jinja2 . FileSystemLoader ( THIS_DIR ) ) #NEWLINE# template = env . get_template ( TEMPLATE_NAME ) #NEWLINE# wfh . write ( template . render ( device = self . device , sensors = self . sensors , iterations = self . times , io_stress = self . io_stress , io_scheduler = self . io_scheduler , cleanup = self . cleanup , package = APP_CONFIG [ self . app ] [ 'package' ] , activity = APP_CONFIG [ self . app ] [ 'activity' ] , options = APP_CONFIG [ self . app ] [ 'options' ] , busybox = self . device . busybox ) ) #NEWLINE# #UNINDENT# self . device_script_file = self . device . install ( self . host_script_file ) #NEWLINE# if self . set_launcher_affinity : #NEWLINE# #INDENT# self . _set_launcher_affinity ( ) #NEWLINE# #UNINDENT# self . device . clear_logcat ( )