def initializeLibraries(self, browser_config): if browser_config['remote'] == True: cmanager, platform_type, ffprocess = self.getPlatformType(False) from ffprocess_remote import RemoteProcess self._ffprocess = RemoteProcess(browser_config['host'], browser_config['port'], browser_config['deviceroot']) self._ffsetup = FFSetup(self._ffprocess) self._ffsetup.initializeRemoteDevice(browser_config, ffprocess) self._hostproc = ffprocess
def __init__(self, options): self.remoteProcess = None options['env'] = ','.join([ '%s=%s' % (str(key), str(value)) for key, value in options.get('env', {}).items() ]) if (options['xperf_path'] is not None and (options['xperf_path'].strip() == 'None' or options['xperf_path'].strip() == '')): options['xperf_path'] = None self.options = options for key, value in defaults.items(): setattr(self, key, options.get(key, value)) if (self.host): from ffprocess_remote import RemoteProcess self.remoteProcess = RemoteProcess(self.host, self.port, self.deviceroot) if self.env: self.command = ' "%s" %s' % (self.env, self.command) options['command'] = self.command