Bug 932149 - add --e10s option to mach's mochitest commands and to testrunner.py. r=ted

This commit is contained in:
Mark Hammond 2013-11-04 10:07:49 +11:00
Родитель a4d939b3c4
Коммит a622aa8db3
3 изменённых файлов: 14 добавлений и 1 удалений

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

@ -186,7 +186,7 @@ class MochitestRunner(MozbuildObject):
debugger_args=None, shuffle=False, keep_open=False, rerun_failures=False,
no_autorun=False, repeat=0, run_until_failure=False, slow=False,
chunk_by_dir=0, total_chunks=None, this_chunk=None, jsdebugger=False,
debug_on_failure=False, start_at=None, end_at=None):
debug_on_failure=False, start_at=None, end_at=None, e10s=False):
"""Runs a mochitest.
test_file is a path to a test file. It can be a relative path from the
@ -290,6 +290,8 @@ class MochitestRunner(MozbuildObject):
options.debugOnFailure = debug_on_failure
options.startAt = start_at
options.endAt = end_at
options.e10s = e10s
mozinfo.update({"e10s": e10s}) # for test manifest parsing.
options.failureFile = failure_file_path
@ -426,6 +428,10 @@ def MochitestCommand(func):
help='Start the browser JS debugger before running the test. Implies --no-autorun.')
func = jsdebugger(func)
this_chunk = CommandArgument('--e10s', action='store_true',
help='Run tests with electrolysis preferences and test filtering enabled.')
func = this_chunk(func)
path = CommandArgument('test_file', default=None, nargs='?',
metavar='TEST',
help='Test to run. Can be specified as a single file, a ' \

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

@ -346,6 +346,12 @@ class MochitestOptions(optparse.OptionParser):
"dest": "debugOnFailure",
"help": "breaks execution and enters the JS debugger on a test failure. Should be used together with --jsdebugger."
}],
[["--e10s"],
{ "action": "store_true",
"default": False,
"dest": "e10s",
"help": "Run tests with electrolysis preferences and test filtering enabled.",
}],
]
def __init__(self, **kwargs):

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

@ -572,6 +572,7 @@ class Mochitest(MochitestUtilsMixin):
""" create the profile and add optional chrome bits and files if requested """
if options.browserChrome and options.timeout:
options.extraPrefs.append("testing.browserTestHarness.timeout=%d" % options.timeout)
options.extraPrefs.append("browser.tabs.remote=%s" % ('true' if options.e10s else 'false'))
# get extensions to install
extensions = self.getExtensionsToInstall(options)