mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1255064 - MarionetteHarness should internally use dicts for arguments; r=maja_zf a=test-only
MozReview-Commit-ID: 94muKM44wVq
This commit is contained in:
parent
36992d510c
commit
0170e73a8f
2
dom/media/test/external/mach_commands.py
vendored
2
dom/media/test/external/mach_commands.py
vendored
@ -50,7 +50,7 @@ def run_external_media_test(tests, testtype=None, topsrcdir=None, **kwargs):
|
||||
args,
|
||||
{"mach": sys.stdout})
|
||||
failed = mn_cli(MediaTestRunner, MediaTestArguments, FirefoxMediaHarness,
|
||||
args=args)
|
||||
args=vars(args))
|
||||
|
||||
if failed > 0:
|
||||
return 1
|
||||
|
@ -53,23 +53,24 @@ class MarionetteHarness(object):
|
||||
args.logger_name, args, logger_defaults or {"tbpl": sys.stdout})
|
||||
|
||||
args.logger = logger
|
||||
return args
|
||||
return vars(args)
|
||||
|
||||
def process_args(self):
|
||||
if self.args.pydebugger:
|
||||
MarionetteTestCase.pydebugger = __import__(self.args.pydebugger)
|
||||
if self.args.get('pydebugger'):
|
||||
MarionetteTestCase.pydebugger = __import__(self.args['pydebugger'])
|
||||
|
||||
def run(self):
|
||||
try:
|
||||
self.process_args()
|
||||
args_dict = vars(self.args)
|
||||
tests = args_dict.pop('tests')
|
||||
runner = self._runner_class(**args_dict)
|
||||
tests = self.args.pop('tests')
|
||||
runner = self._runner_class(**self.args)
|
||||
runner.run_tests(tests)
|
||||
return runner.failed
|
||||
except Exception:
|
||||
self.args.logger.error('Failure during test execution.',
|
||||
exc_info=True)
|
||||
logger = self.args.get('logger')
|
||||
if logger:
|
||||
logger.error('Failure during test execution.',
|
||||
exc_info=True)
|
||||
raise
|
||||
|
||||
|
||||
|
@ -67,7 +67,7 @@ def run_marionette(tests, b2g_path=None, emulator=None, testtype=None,
|
||||
args.logger = commandline.setup_logging("Marionette Unit Tests",
|
||||
args,
|
||||
{"mach": sys.stdout})
|
||||
failed = MarionetteHarness(MarionetteTestRunner, args=args).run()
|
||||
failed = MarionetteHarness(MarionetteTestRunner, args=vars(args)).run()
|
||||
if failed > 0:
|
||||
return 1
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user