Bug 1573585 - ensure debugger name is prefixed to the application command when using mach test r=gbrown,Ehsan

If test is run using the `mach test` harness, populate the `extra_args` with `--debugger=<name>` that is expected by the underlying harnesses (`wpt,`, `mochitest`)  in order to maintain compatibility.

Differential Revision: https://phabricator.services.mozilla.com/D42952

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Edwin Gao 2019-08-22 20:51:11 +00:00
parent 48511543d2
commit ca724248e4

View File

@ -323,10 +323,18 @@ class Test(MachCommandBase):
print(UNKNOWN_TEST)
return 1
if log_args.get('debugger', None):
if log_args.get('debugger', None):
import mozdebug
if not mozdebug.get_debugger_info(log_args.get('debugger')):
sys.exit(1)
extra_args_debugger_notation = '='.join([
'--debugger',
log_args.get('debugger')
]).encode('ascii')
if extra_args:
extra_args.append(extra_args_debugger_notation)
else:
extra_args = [extra_args_debugger_notation]
# Create shared logger
format_args = {'level': self._mach_context.settings['test']['level']}