def __init__(self, **kwargs): BaseMarionetteTestRunner.__init__(self, **kwargs) if not self.server_root: self.server_root = external_media_tests.resources # pick up prefs from marionette_driver.geckoinstance.DesktopInstance self.app = 'fxdesktop' self.test_handlers = [MediaTestCase] # Used in HTML report (--log-html) def gather_media_debug(test, status): rv = {} marionette = test._marionette_weakref() if marionette.session is not None: try: with marionette.using_context(marionette.CONTEXT_CHROME): debug_lines = marionette.execute_script(debug_script) if debug_lines: name = 'mozMediaSourceObject.mozDebugReaderData' rv[name] = '\n'.join(debug_lines) else: logger = mozlog.get_default_logger() logger.info('No data available about ' 'mozMediaSourceObject') except: logger = mozlog.get_default_logger() logger.warning('Failed to gather test failure media debug', exc_info=True) return rv self.result_callbacks.append(gather_media_debug)
def __init__(self, **kwargs): # if no server root is specified, use the packaged resources if not kwargs.get('server_root'): kwargs['server_root'] = os.path.abspath(os.path.join( os.path.dirname(__file__), 'resources')) def gather_debug(test, status): rv = {} marionette = test._marionette_weakref() # In the event we're gathering debug without starting a session, skip marionette commands if marionette.session is not None: try: marionette.switch_to_frame() marionette.push_permission('settings-read', True) marionette.push_permission('settings-api-read', True) rv['settings'] = json.dumps(marionette.execute_async_script(""" var req = window.navigator.mozSettings.createLock().get('*'); req.onsuccess = function() { marionetteScriptFinished(req.result); }""", sandbox='system'), sort_keys=True, indent=4, separators=(',', ': ')) except: logger = mozlog.structured.get_default_logger() if not logger: logger = mozlog.getLogger('gaiatest') logger.warning('Failed to gather test failure debug.', exc_info=True) return rv BaseMarionetteTestRunner.__init__(self, result_callbacks=[gather_debug], **kwargs) GaiaTestRunnerMixin.__init__(self, **kwargs) HTMLReportingTestRunnerMixin.__init__(self, name=__name__, version=__version__, **kwargs) TreeherderTestRunnerMixin.__init__(self, **kwargs) self.test_handlers = [GaiaTestCase]
def run_tests(self, tests): # Ensure Marionette is always reset before starting tests # This might need support in Marionette base self.marionette = None self.tests = [] BaseMarionetteTestRunner.run_tests(self, tests)
def __init__(self, **kwargs): BaseMarionetteTestRunner.__init__(self, **kwargs) # select the appropriate GeckoInstance self.app = 'fxdesktop' if not self.server_root: self.server_root = firefox_ui_tests.resources self.test_handlers = [FirefoxTestCase]
def __init__(self, **kwargs): BaseMarionetteTestRunner.__init__(self, **kwargs) GaiaTestRunnerMixin.__init__(self, **kwargs) HTMLReportingTestRunnerMixin.__init__(self, name=__name__, version=__version__, **kwargs) self.test_handlers = [GaiaTestCase]
def __init__(self, **kwargs): # if no server root is specified, use the packaged resources if not kwargs.get("server_root"): kwargs["server_root"] = os.path.abspath(os.path.join(os.path.dirname(__file__), "resources")) BaseMarionetteTestRunner.__init__(self, **kwargs) GaiaTestRunnerMixin.__init__(self, **kwargs) HTMLReportingTestRunnerMixin.__init__(self, name=__name__, version=__version__, **kwargs) self.test_handlers = [GaiaTestCase]
def __init__(self, *args, **kwargs): if not kwargs.get('server_root'): kwargs['server_root'] = firefox_ui_tests.resources prefs = kwargs.get('prefs', {}) extra_prefs = copy.deepcopy(ReleaseTestRunner.extra_prefs) extra_prefs.update(prefs) kwargs['prefs'] = extra_prefs BaseMarionetteTestRunner.__init__(self, *args, **kwargs) self.test_handlers = [FirefoxTestCase]
def __init__(self, *args, **kwargs): if not kwargs.get('server_root'): kwargs['server_root'] = firefox_ui_tests.resources prefs = kwargs.get('prefs', {}) runner_prefs = copy.deepcopy(default_prefs) runner_prefs.update(prefs) kwargs['prefs'] = runner_prefs BaseMarionetteTestRunner.__init__(self, *args, **kwargs) self.test_handlers = [FirefoxTestCase]
def __init__(self, **kwargs): # if no server root is specified, use the packaged resources if not kwargs.get('server_root'): kwargs['server_root'] = os.path.abspath( os.path.join(os.path.dirname(__file__), 'resources')) BaseMarionetteTestRunner.__init__(self, **kwargs) GaiaTestRunnerMixin.__init__(self, **kwargs) HTMLReportingTestRunnerMixin.__init__(self, name=__name__, version=__version__, **kwargs) self.test_handlers = [GaiaTestCase]
def __init__(self, **kwargs): BaseMarionetteTestRunner.__init__(self, **kwargs) if not self.server_root: self.server_root = firefox_ui_tests.resources # Bug 1146847: This needs a refactoring given that our default # preferences are not coming from the command line self.prefs.update(DEFAULT_PREFS) if not kwargs.get('e10s'): self.prefs.update({'browser.tabs.remote.autostart': False}) self.test_handlers = [FirefoxTestCase]
def __init__(self, **kwargs): BaseMarionetteTestRunner.__init__(self, **kwargs) # Some initial steps going through! self.parse_blocked_tests_file() self.parse_descriptions_file() # Store the toolkit location to infer the location of some files relative to it, such as # the devices config or the css template self.testvars['toolkit_cfg']['toolkit_location'] = kwargs['toolkit_location'] GaiaTestRunnerMixin.__init__(self, **kwargs) HTMLReportingTestRunnerMixin.__init__(self, name='gaiatest-master', version=__version__, html_output=self.testvars['output']['html_output'], **kwargs) self.test_handlers = [GaiaTestCase]
def __init__(self, **kwargs): # if no server root is specified, use the packaged resources if not kwargs.get('server_root'): kwargs['server_root'] = os.path.abspath( os.path.join(os.path.dirname(__file__), 'resources')) def gather_debug(test, status): rv = {} marionette = test._marionette_weakref() # In the event we're gathering debug without starting a session, skip marionette commands if marionette.session is not None: try: marionette.switch_to_frame() rv['settings'] = json.dumps( marionette.execute_async_script(""" SpecialPowers.pushPermissions([ {type: 'settings-read', allow: true, context: document}, {type: 'settings-api-read', allow: true, context: document}, ], function() { var req = window.navigator.mozSettings.createLock().get('*'); req.onsuccess = function() { marionetteScriptFinished(req.result); } });""", special_powers=True), sort_keys=True, indent=4, separators=(',', ': ')) except: logger = mozlog.structured.get_default_logger() if not logger: logger = mozlog.getLogger('gaiatest') logger.warning('Failed to gather test failure debug.', exc_info=True) return rv BaseMarionetteTestRunner.__init__(self, result_callbacks=[gather_debug], **kwargs) GaiaTestRunnerMixin.__init__(self, **kwargs) HTMLReportingTestRunnerMixin.__init__(self, name=__name__, version=__version__, **kwargs) TreeherderTestRunnerMixin.__init__(self, **kwargs) self.test_handlers = [GaiaTestCase]
def add_tests_to_runner(args): runner = BaseMarionetteTestRunner(type=args.type, test_tags=args.tags) runner._appName = args.app_name runner._device = args.device for test in args.tests: runner.add_test(test) unfound_tests = [] runner_tests = runner.tests[:] for run_test in runner_tests: if not os.path.exists(run_test['filepath']): runner.tests.remove(run_test) unfound_tests.append(run_test) return runner, unfound_tests
def __init__(self, **kwargs): BaseMarionetteTestRunner.__init__(self, **kwargs) # Some initial steps going through! self.parse_blocked_tests_file() self.parse_descriptions_file() # Store the toolkit location to infer the location of some files relative to it, such as # the devices config or the css template self.testvars['toolkit_cfg']['toolkit_location'] = kwargs[ 'toolkit_location'] GaiaTestRunnerMixin.__init__(self, **kwargs) HTMLReportingTestRunnerMixin.__init__( self, name='gaiatest-master', version=__version__, html_output=self.testvars['output']['html_output'], **kwargs) self.test_handlers = [GaiaTestCase]
def __init__(self, **kwargs): # if no server root is specified, use the packaged resources if not kwargs.get("server_root"): kwargs["server_root"] = os.path.abspath(os.path.join(os.path.dirname(__file__), "resources")) def gather_debug(test, status): rv = {} marionette = test._marionette_weakref() # In the event we're gathering debug without starting a session, skip marionette commands if marionette.session is not None: try: marionette.switch_to_frame() rv["settings"] = json.dumps( marionette.execute_async_script( """ SpecialPowers.pushPermissions([ {type: 'settings-read', allow: true, context: document}, {type: 'settings-api-read', allow: true, context: document}, ], function() { var req = window.navigator.mozSettings.createLock().get('*'); req.onsuccess = function() { marionetteScriptFinished(req.result); } });""", special_powers=True, ), sort_keys=True, indent=4, separators=(",", ": "), ) except: logger = mozlog.structured.get_default_logger() if not logger: logger = mozlog.getLogger("gaiatest") logger.warning("Failed to gather test failure debug.", exc_info=True) return rv BaseMarionetteTestRunner.__init__(self, result_callbacks=[gather_debug], **kwargs) GaiaTestRunnerMixin.__init__(self, **kwargs) HTMLReportingTestRunnerMixin.__init__(self, name=__name__, version=__version__, **kwargs) TreeherderTestRunnerMixin.__init__(self, **kwargs) self.test_handlers = [GaiaTestCase]
def __init__(self, **kwargs): BaseMarionetteTestRunner.__init__(self, **kwargs) # select the appropriate GeckoInstance self.app = 'fxdesktop' self.test_handlers = [FirefoxTestCase]
def __init__(self, **kwargs): BaseMarionetteTestRunner.__init__(self, **kwargs) self.test_handlers = [FirefoxTestCase]
def __init__(self, *args, **kwargs): if not kwargs.get('server_root'): kwargs['server_root'] = tests.resources BaseMarionetteTestRunner.__init__(self, *args, **kwargs) self.test_handlers = [FirefoxTestCase]