Bug 1023464 - Add support for the --setpref argument to mach reftest. r=gps

This commit is contained in:
Markus Stange 2014-06-11 14:44:42 +02:00
parent 65a157254a
commit 71f375bf75

View File

@ -214,7 +214,7 @@ class ReftestRunner(MozbuildObject):
def run_desktop_test(self, test_file=None, filter=None, suite=None,
debugger=None, parallel=False, shuffle=False,
e10s=False, this_chunk=None, total_chunks=None):
e10s=False, extraPrefs=None, this_chunk=None, total_chunks=None):
"""Runs a reftest.
test_file is a path to a test file. It can be a relative path from the
@ -264,6 +264,10 @@ class ReftestRunner(MozbuildObject):
if e10s:
extra_args.append('--e10s')
if extraPrefs:
for pref in extraPrefs:
extra_args.extend(['--setpref', pref])
if this_chunk:
extra_args.append('--this-chunk=%s' % this_chunk)
@ -309,6 +313,11 @@ def ReftestCommand(func):
help='Use content processes.')
func = e10s(func)
extraPrefs = CommandArgument('--setpref', action='append',
default=[], dest='extraPrefs', metavar='PREF=VALUE',
help='Set prefs in the reftest profile.')
func = extraPrefs(func)
totalChunks = CommandArgument('--total-chunks',
help = 'How many chunks to split the tests up into.')
func = totalChunks(func)