def __init__(self, config, core): """ Args: config (VoltaConfig): module configuration data """ Phone.__init__(self, config, core) self.log_stdout_reader = None self.log_stderr_reader = None self.drain_log_stdout = None self.path_to_util = config.get_option('phone', 'util') self.source = config.get_option('phone', 'source') self.phone_q = None try: self.compiled_regexp = re.compile( config.get_option('phone', 'event_regexp', iphone_logevent_re), re.VERBOSE | re.IGNORECASE) except SyntaxError: logger.debug('Unable to parse specified regexp', exc_info=True) raise RuntimeError( "Unable to parse specified regexp: %s" % config.get_option('phone', 'event_regexp', iphone_logevent_re)) self.my_metrics = {} self.__create_my_metrics() self.__test_interaction_with_phone()
def __init__(self, config): """ Args: config (VoltaConfig): module configuration data """ Phone.__init__(self, config) self.logcat_stdout_reader = None self.logcat_stderr_reader = None # mandatory options self.source = config.get_option('phone', 'source') #self.unplug_type = config.get('unplug_type', 'auto') # lightning app configuration self.lightning_apk_path = config.get_option( 'phone', 'lightning', pkg_resources.resource_filename( 'volta.providers.phones', 'binary/lightning-new3.apk' ) ) self.lightning_apk_class = config.get_option('phone', 'lightning_class') self.lightning_apk_fname = None # test app configuration self.test_apps = config.get_option('phone', 'test_apps') self.test_class = config.get_option('phone', 'test_class') self.test_package = config.get_option('phone', 'test_package') self.test_runner = config.get_option('phone', 'test_runner') self.cleanup_apps = config.get_option('phone', 'cleanup_apps') self.regexp = config.get_option('phone', 'event_regexp', event_regexp) try: self.compiled_regexp = re.compile(self.regexp, re.VERBOSE | re.IGNORECASE) except: logger.debug('Unable to parse specified regexp', exc_info=True) raise RuntimeError("Unable to parse specified regexp") self.test_performer = None
def __init__(self, config): """ Args: config (dict): module configuration data """ Phone.__init__(self, config) self.logcat_stdout_reader = None self.logcat_stderr_reader = None # mandatory options self.source = config.get('source', '01dd6e7352c97826') self.unplug_type = config.get('unplug_type', 'auto') # lightning app configuration self.lightning_apk_path = config.get('lightning', pkg_resources.resource_filename( 'volta.providers.phones', 'binary/lightning-new3.apk') ) logger.info('lightning_apk_path '+self.lightning_apk_path) self.blink_delay = config.get('blink_delay', 0) self.blink_toast = config.get('blink_toast', 0) self.lightning_apk_class = config.get('lightning_class', 'net.yandex.overload.lightning') self.lightning_apk_fname = None # test app configuration self.test_apps = config.get('test_apps', []) self.test_class = config.get('test_class', '') self.test_package = config.get('test_package', '') self.test_runner = config.get('test_runner', '')
def __init__(self, config, core): """ Args: config (VoltaConfig): module configuration data """ Phone.__init__(self, config, core) self.logcat_stdout_reader = None self.logcat_stderr_reader = None # mandatory options self.source = config.get_option('phone', 'source') # lightning app configuration self.lightning_apk_path = config.get_option( 'phone', 'lightning', pkg_resources.resource_filename('volta.providers.phones', 'binary/lightning-new3.apk')) self.lightning_apk_class = config.get_option('phone', 'lightning_class') self.lightning_apk_fname = None # test app configuration self.test_apps = config.get_option('phone', 'test_apps') self.test_class = config.get_option('phone', 'test_class') self.test_package = config.get_option('phone', 'test_package') self.test_runner = config.get_option('phone', 'test_runner') self.cleanup_apps = config.get_option('phone', 'cleanup_apps') try: self.compiled_regexp = re.compile( config.get_option('phone', 'event_regexp', event_regexp), re.VERBOSE | re.IGNORECASE) except SyntaxError: logger.debug('Unable to parse specified regexp', exc_info=True) raise RuntimeError( "Unable to parse specified regexp: %s" % config.get_option('phone', 'event_regexp', event_regexp)) self.logcat_pipeline = None self.test_performer = None self.phone_q = None subprocess.call('adb start-server', shell=True) # start adb server self.__test_interaction_with_phone() self.worker = None self.closed = False self.shellexec_metrics = config.get_option('phone', 'shellexec_metrics') self.shellexec_executor = threading.Thread( target=self.__shell_executor) self.shellexec_executor.setDaemon(True) self.shellexec_executor.start() self.my_metrics = {} self.__create_my_metrics()
def __init__(self, config): """ Args: config (dict): module configuration data """ Phone.__init__(self, config) self.log_stdout_reader = None self.log_stderr_reader = None self.drain_log_stdout = None self.path_to_util = config.get_option('phone', 'util') self.source = config.get_option('phone', 'source')
def __init__(self, config): """ Args: config (dict): module configuration data """ Phone.__init__(self, config) self.log_stdout_reader = None self.log_stderr_reader = None self.path_to_util = config.get( 'util', "/Applications/Apple\ Configurator\ 2.app/Contents/MacOS/") self.source = config.get('source', '0x6382910F98C26')
def __init__(self, config): """ Args: config (dict): module configuration data """ Phone.__init__(self, config) self.logcat_stdout_reader = None self.logcat_stderr_reader = None # mandatory options self.source = config.get('source', '00dc3419957ba583') self.unplug_type = config.get('unplug_type', 'auto') # lightning app configuration self.lightning_apk_path = config.get( 'lightning', pkg_resources.resource_filename('volta.providers.phones', 'binary/lightning-new3.apk')) self.lightning_apk_class = config.get('lightning_class', 'net.yandex.overload.lightning') self.lightning_apk_fname = None # test app configuration self.test_apps = config.get('test_apps', []) self.test_class = config.get('test_class', '') self.test_package = config.get('test_package', '') self.test_runner = config.get('test_runner', '')