Bug 1097125 - part 1 - add filtering support to |mach reftest-{remote,b2g-desktop}|; r=ted.mielczarek

This commit is contained in:
Nathan Froyd 2014-11-11 12:16:53 -05:00
Родитель bb859982fe
Коммит 75d860a713
1 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -110,9 +110,12 @@ class ReftestRunner(MozbuildObject):
return "'%s'" % re.sub("'", r"'\''", s)
def run_b2g_test(self, b2g_home=None, xre_path=None, test_file=None,
suite=None, **kwargs):
suite=None, filter=None, **kwargs):
"""Runs a b2g reftest.
filter is a regular expression (in JS syntax, as could be passed to the
RegExp constructor) to select which reftests to run from the manifest.
test_file is a path to a test file. It can be a relative path from the
top source directory, an absolute filename, or a directory containing
test files.
@ -206,6 +209,7 @@ class ReftestRunner(MozbuildObject):
options.httpdPath = os.path.join(self.topsrcdir, 'netwerk', 'test', 'httpserver')
options.xrePath = xre_path
options.ignoreWindowSize = True
options.filter = filter
# Don't enable oop for crashtest until they run oop in automation
if suite == 'reftest':
@ -376,6 +380,11 @@ def B2GCommand(func):
help = 'Which chunk to run between 1 and --total-chunks.')
func = thisChunk(func)
flter = CommandArgument('--filter', metavar='REGEX',
help='A JS regular expression to match test URLs against, to select '
'a subset of tests to run.')
func = flter(func)
oop = CommandArgument('--enable-oop', action='store_true', dest='oop',
help = 'Run tests in out-of-process mode.')
func = oop(func)