Bug 994711 - Expose --this-chunk and --total-chunks to reftest mach targets, r=jgriffin, DONTBUILD, a=NPOTB

This commit is contained in:
Andrew Halberstadt 2014-04-14 16:51:46 -04:00
parent b237f36aa4
commit 8861190036

View File

@ -206,7 +206,8 @@ 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, e10s=False):
debugger=None, parallel=False, e10s=False, 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
@ -251,6 +252,12 @@ class ReftestRunner(MozbuildObject):
if e10s:
extra_args.append('--e10s')
if this_chunk:
extra_args.append('--this-chunk=%s' % this_chunk)
if total_chunks:
extra_args.append('--total-chunks=%s' % total_chunks)
if extra_args:
args = [os.environ.get(b'EXTRA_TEST_ARGS', '')]
args.extend(extra_args)
@ -283,9 +290,17 @@ def ReftestCommand(func):
func = parallel(func)
e10s = CommandArgument('--e10s', action='store_true',
help='Use content processes.')
help='Use content processes.')
func = e10s(func)
totalChunks = CommandArgument('--total-chunks',
help = 'How many chunks to split the tests up into.')
func = totalChunks(func)
thisChunk = CommandArgument('--this-chunk',
help = 'Which chunk to run between 1 and --total-chunks.')
func = thisChunk(func)
return func
def B2GCommand(func):
@ -320,6 +335,14 @@ def B2GCommand(func):
help='host:port to use when connecting to Marionette')
func = marionette(func)
totalChunks = CommandArgument('--total-chunks', dest='totalChunks',
help = 'How many chunks to split the tests up into.')
func = totalChunks(func)
thisChunk = CommandArgument('--this-chunk', dest='thisChunk',
help = 'Which chunk to run between 1 and --total-chunks.')
func = thisChunk(func)
path = CommandArgument('test_file', default=None, nargs='?',
metavar='TEST',
help='Test to run. Can be specified as a single file, a ' \