def __init__(self, automation, devicemanager, options, scriptDir): RefTest.__init__(self) self.automation = automation self._devicemanager = devicemanager self.scriptDir = scriptDir self.remoteApp = options.app self.remoteProfile = options.remoteProfile self.remoteTestRoot = options.remoteTestRoot self.remoteLogFile = options.remoteLogFile self.localLogName = options.localLogName self.pidFile = options.pidFile if self.automation.IS_DEBUG_BUILD: self.SERVER_STARTUP_TIMEOUT = 180 else: self.SERVER_STARTUP_TIMEOUT = 90 self.automation.deleteANRs() self.automation.deleteTombstones() self._populate_logger(options) outputHandler = OutputHandler(self.log, options.utilityPath, options.symbolsPath) # RemoteAutomation.py's 'messageLogger' is also used by mochitest. Mimic a mochitest # MessageLogger object to re-use this code path. outputHandler.write = outputHandler.__call__ self.automation._processArgs['messageLogger'] = outputHandler
def __init__(self, automation, devicemanager, options, scriptDir): RefTest.__init__(self) self.automation = automation self._devicemanager = devicemanager self.scriptDir = scriptDir self.remoteApp = options.app self.remoteProfile = options.remoteProfile self.remoteTestRoot = options.remoteTestRoot self.remoteLogFile = options.remoteLogFile self.remoteCache = os.path.join(options.remoteTestRoot, "cache/") self.localLogName = options.localLogName self.pidFile = options.pidFile if self.automation.IS_DEBUG_BUILD: self.SERVER_STARTUP_TIMEOUT = 180 else: self.SERVER_STARTUP_TIMEOUT = 90 self.automation.deleteANRs() self.automation.deleteTombstones() self._devicemanager.removeDir(self.remoteCache) self._populate_logger(options) outputHandler = OutputHandler(self.log, options.utilityPath, options.symbolsPath) # RemoteAutomation.py's 'messageLogger' is also used by mochitest. Mimic a mochitest # MessageLogger object to re-use this code path. outputHandler.write = outputHandler.__call__ self.automation._processArgs['messageLogger'] = outputHandler
def __init__(self, marionette_args): RefTest.__init__(self) self.last_test = os.path.basename(__file__) self.marionette_args = marionette_args self.profile = None self.runner = None self.test_script = os.path.join(here, 'b2g_start_script.js') self.timeout = None
def __init__(self, marionette_args): RefTest.__init__(self) self.last_test = os.path.basename(__file__) self.marionette_args = marionette_args self.profile = None self.runner = None self.test_script = os.path.join(here, 'b2g_start_script.js') self.timeout = None
def __init__(self, automation, devicemanager, options, scriptDir): RefTest.__init__(self, automation) self._devicemanager = devicemanager self.scriptDir = scriptDir self.remoteApp = options.app self.remoteProfile = options.remoteProfile self.remoteTestRoot = options.remoteTestRoot self.remoteLogFile = options.remoteLogFile self.localLogName = options.localLogName if self.automation.IS_DEBUG_BUILD: self.SERVER_STARTUP_TIMEOUT = 180 else: self.SERVER_STARTUP_TIMEOUT = 90
def __init__(self, automation, devicemanager, options, scriptDir): RefTest.__init__(self, automation) self._devicemanager = devicemanager self.scriptDir = scriptDir self.remoteApp = options.app self.remoteProfile = options.remoteProfile self.remoteTestRoot = options.remoteTestRoot self.remoteLogFile = options.remoteLogFile self.localLogName = options.localLogName if self.automation.IS_DEBUG_BUILD: self.SERVER_STARTUP_TIMEOUT = 180 else: self.SERVER_STARTUP_TIMEOUT = 90
def __init__(self, automation, devicemanager, options, scriptDir): RefTest.__init__(self, automation) self._devicemanager = devicemanager self.runSSLTunnel = False self.remoteTestRoot = options.remoteTestRoot self.remoteProfile = options.remoteProfile self.automation.setRemoteProfile(self.remoteProfile) self.localLogName = options.localLogName self.remoteLogFile = options.remoteLogFile self.bundlesDir = '/system/b2g/distribution/bundles' self.remoteMozillaPath = '/data/b2g/mozilla' self.remoteProfilesIniPath = os.path.join(self.remoteMozillaPath, 'profiles.ini') self.originalProfilesIni = None self.scriptDir = scriptDir self.SERVER_STARTUP_TIMEOUT = 90 if self.automation.IS_DEBUG_BUILD: self.SERVER_STARTUP_TIMEOUT = 180
def __init__(self, automation, devicemanager, options, scriptDir): RefTest.__init__(self, automation) self._devicemanager = devicemanager self.runSSLTunnel = False self.remoteTestRoot = options.remoteTestRoot self.remoteProfile = options.remoteProfile self.automation.setRemoteProfile(self.remoteProfile) self.localLogName = options.localLogName self.remoteLogFile = options.remoteLogFile self.bundlesDir = '/system/b2g/distribution/bundles' self.remoteMozillaPath = '/data/b2g/mozilla' self.remoteProfilesIniPath = os.path.join(self.remoteMozillaPath, 'profiles.ini') self.originalProfilesIni = None self.scriptDir = scriptDir self.SERVER_STARTUP_TIMEOUT = 90 if self.automation.IS_DEBUG_BUILD: self.SERVER_STARTUP_TIMEOUT = 180
def __init__(self, options, scriptDir): RefTest.__init__(self, options.suite) self.run_by_manifest = False self.scriptDir = scriptDir self.localLogName = options.localLogName verbose = False if options.log_tbpl_level == 'debug' or options.log_mach_level == 'debug': verbose = True print "set verbose!" self.device = ADBDevice(adb=options.adb_path or 'adb', device=options.deviceSerial, test_root=options.remoteTestRoot, verbose=verbose) if options.remoteTestRoot is None: options.remoteTestRoot = posixpath.join(self.device.test_root, "reftest") options.remoteProfile = posixpath.join(options.remoteTestRoot, "profile") options.remoteLogFile = posixpath.join(options.remoteTestRoot, "reftest.log") options.logFile = options.remoteLogFile self.remoteProfile = options.remoteProfile self.remoteTestRoot = options.remoteTestRoot if not options.ignoreWindowSize: parts = self.device.get_info('screen')['screen'][0].split() width = int(parts[0].split(':')[1]) height = int(parts[1].split(':')[1]) if (width < 1366 or height < 1050): self.error("ERROR: Invalid screen resolution %sx%s, " "please adjust to 1366x1050 or higher" % (width, height)) self._populate_logger(options) self.outputHandler = OutputHandler(self.log, options.utilityPath, options.symbolsPath) # RemoteAutomation.py's 'messageLogger' is also used by mochitest. Mimic a mochitest # MessageLogger object to re-use this code path. self.outputHandler.write = self.outputHandler.__call__ args = {'messageLogger': self.outputHandler} self.automation = RemoteAutomation(self.device, appName=options.app, remoteProfile=self.remoteProfile, remoteLog=options.remoteLogFile, processArgs=args) self.environment = self.automation.environment if self.automation.IS_DEBUG_BUILD: self.SERVER_STARTUP_TIMEOUT = 180 else: self.SERVER_STARTUP_TIMEOUT = 90 self.remoteCache = os.path.join(options.remoteTestRoot, "cache/") # Check that Firefox is installed expected = options.app.split('/')[-1] if not self.device.is_app_installed(expected): raise Exception("%s is not installed on this device" % expected) self.device.clear_logcat() self.device.rm(self.remoteCache, force=True, recursive=True) procName = options.app.split('/')[-1] self.device.stop_application(procName) if self.device.process_exist(procName): self.log.error("unable to kill %s before starting tests!" % procName)
def __init__(self, options, scriptDir): RefTest.__init__(self, options.suite) self.run_by_manifest = False self.scriptDir = scriptDir self.localLogName = options.localLogName verbose = False if (options.log_mach_verbose or options.log_tbpl_level == "debug" or options.log_mach_level == "debug" or options.log_raw_level == "debug"): verbose = True print("set verbose!") expected = options.app.split("/")[-1] self.device = ADBDeviceFactory( adb=options.adb_path or "adb", device=options.deviceSerial, test_root=options.remoteTestRoot, verbose=verbose, run_as_package=expected, ) if options.remoteTestRoot is None: options.remoteTestRoot = posixpath.join(self.device.test_root, "reftest") options.remoteProfile = posixpath.join(options.remoteTestRoot, "profile") options.remoteLogFile = posixpath.join(options.remoteTestRoot, "reftest.log") options.logFile = options.remoteLogFile self.remoteProfile = options.remoteProfile self.remoteTestRoot = options.remoteTestRoot if not options.ignoreWindowSize: parts = self.device.get_info("screen")["screen"][0].split() width = int(parts[0].split(":")[1]) height = int(parts[1].split(":")[1]) if width < 1366 or height < 1050: self.error("ERROR: Invalid screen resolution %sx%s, " "please adjust to 1366x1050 or higher" % (width, height)) self._populate_logger(options) self.outputHandler = OutputHandler(self.log, options.utilityPath, options.symbolsPath) self.SERVER_STARTUP_TIMEOUT = 90 self.remoteCache = os.path.join(options.remoteTestRoot, "cache/") # Check that Firefox is installed expected = options.app.split("/")[-1] if not self.device.is_app_installed(expected): raise Exception("%s is not installed on this device" % expected) self.device.run_as_package = expected self.device.clear_logcat() self.device.rm(self.remoteCache, force=True, recursive=True) procName = options.app.split("/")[-1] self.device.stop_application(procName) if self.device.process_exist(procName): self.log.error("unable to kill %s before starting tests!" % procName)