зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1031635 - Add --debugger-args option to reftest mach commands. r=gps
This allows useful argument combinations such as: --debugger valgrind --debugger-args "--tool=memcheck --leak-check=no --trace-children=yes --num-callers=50"
This commit is contained in:
Родитель
0083a663cf
Коммит
17a4bcf621
|
@ -214,7 +214,7 @@ class ReftestRunner(MozbuildObject):
|
|||
return reftest.run_remote_reftests(parser, options, args)
|
||||
|
||||
def run_desktop_test(self, test_file=None, filter=None, suite=None,
|
||||
debugger=None, parallel=False, shuffle=False,
|
||||
debugger=None, debugger_args=None, parallel=False, shuffle=False,
|
||||
e10s=False, extraPrefs=None, this_chunk=None, total_chunks=None):
|
||||
"""Runs a reftest.
|
||||
|
||||
|
@ -231,6 +231,8 @@ class ReftestRunner(MozbuildObject):
|
|||
debugger is the program name (in $PATH) or the full path of the
|
||||
debugger to run.
|
||||
|
||||
debugger_args are the arguments passed to the debugger.
|
||||
|
||||
parallel indicates whether tests should be run in parallel or not.
|
||||
|
||||
shuffle indicates whether to run tests in random order.
|
||||
|
@ -255,6 +257,14 @@ class ReftestRunner(MozbuildObject):
|
|||
if debugger:
|
||||
extra_args.append('--debugger=%s' % debugger)
|
||||
pass_thru = True
|
||||
if debugger_args:
|
||||
# Use _make_shell_string (which quotes) so that we
|
||||
# handle multiple args being passed to the debugger.
|
||||
extra_args.extend(['--debugger-args', self._make_shell_string(debugger_args)])
|
||||
else:
|
||||
if debugger_args:
|
||||
print("--debugger-args passed, but no debugger specified.")
|
||||
return 1
|
||||
|
||||
if parallel:
|
||||
extra_args.append('--run-tests-in-parallel')
|
||||
|
@ -292,6 +302,10 @@ def ReftestCommand(func):
|
|||
help=DEBUGGER_HELP)
|
||||
func = debugger(func)
|
||||
|
||||
debugger_args = CommandArgument('--debugger-args', metavar='DEBUGGER_ARGS',
|
||||
help='Arguments to pass to the debugger.')
|
||||
func = debugger_args(func)
|
||||
|
||||
flter = CommandArgument('--filter', metavar='REGEX',
|
||||
help='A JS regular expression to match test URLs against, to select '
|
||||
'a subset of tests to run.')
|
||||
|
|
Загрузка…
Ссылка в новой задаче