mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1067301 - Add mach / mochitest option to run tests with Windows content sandbox. r=jmaher
This commit is contained in:
parent
d9797dabb3
commit
961cabc974
@ -191,7 +191,7 @@ class MochitestRunner(MozbuildObject):
|
||||
rerun_failures=False, no_autorun=False, repeat=0, run_until_failure=False,
|
||||
slow=False, chunk_by_dir=0, total_chunks=None, this_chunk=None, extraPrefs=[],
|
||||
jsdebugger=False, debug_on_failure=False, start_at=None, end_at=None,
|
||||
e10s=False, dmd=False, dump_output_directory=None,
|
||||
e10s=False, content_sandbox='off', dmd=False, dump_output_directory=None,
|
||||
dump_about_memory_after_test=False, dump_dmd_after_test=False,
|
||||
install_extension=None, quiet=False, environment=[], app_override=None, bisectChunk=None, runByDir=False,
|
||||
useTestMediaDevices=False, **kwargs):
|
||||
@ -313,6 +313,9 @@ class MochitestRunner(MozbuildObject):
|
||||
options.startAt = start_at
|
||||
options.endAt = end_at
|
||||
options.e10s = e10s
|
||||
options.contentSandbox = content_sandbox
|
||||
if options.contentSandbox != 'off':
|
||||
options.e10s = True
|
||||
options.dumpAboutMemoryAfterTest = dump_about_memory_after_test
|
||||
options.dumpDMDAfterTest = dump_dmd_after_test
|
||||
options.dumpOutputDirectory = dump_output_directory
|
||||
@ -495,6 +498,10 @@ def MochitestCommand(func):
|
||||
help='Run tests with electrolysis preferences and test filtering enabled.')
|
||||
func = this_chunk(func)
|
||||
|
||||
this_chunk = CommandArgument('--content-sandbox', default='off', choices=['off', 'warn', 'on'],
|
||||
help='Run tests with the content sandbox enabled or in warn only mode (Windows only). --e10s is assumed.')
|
||||
func = this_chunk(func)
|
||||
|
||||
dmd = CommandArgument('--dmd', action='store_true',
|
||||
help='Run tests with DMD active.')
|
||||
func = dmd(func)
|
||||
|
@ -363,6 +363,12 @@ class MochitestOptions(optparse.OptionParser):
|
||||
"dest": "e10s",
|
||||
"help": "Run tests with electrolysis preferences and test filtering enabled.",
|
||||
}],
|
||||
[["--content-sandbox"],
|
||||
{ "choices": ["off", "warn", "on"],
|
||||
"default": "off",
|
||||
"dest": "contentSandbox",
|
||||
"help": "Run tests with the content sandbox enabled or in warn only mode (Windows only). --e10s is assumed.",
|
||||
}],
|
||||
[["--dmd-path"],
|
||||
{ "action": "store",
|
||||
"default": None,
|
||||
@ -445,7 +451,11 @@ class MochitestOptions(optparse.OptionParser):
|
||||
def verifyOptions(self, options, mochitest):
|
||||
""" verify correct options and cleanup paths """
|
||||
|
||||
if options.contentSandbox != 'off':
|
||||
options.e10s = True
|
||||
|
||||
mozinfo.update({"e10s": options.e10s}) # for test manifest parsing.
|
||||
mozinfo.update({"contentSandbox": options.contentSandbox}) # for test manifest parsing.
|
||||
|
||||
if options.app is None:
|
||||
if build_obj is not None:
|
||||
|
@ -1130,6 +1130,7 @@ class Mochitest(MochitestUtilsMixin):
|
||||
options.extraPrefs.append("testing.browserTestHarness.timeout=%d" % options.timeout)
|
||||
options.extraPrefs.append("browser.tabs.remote=%s" % ('true' if options.e10s else 'false'))
|
||||
options.extraPrefs.append("browser.tabs.remote.autostart=%s" % ('true' if options.e10s else 'false'))
|
||||
options.extraPrefs.append("browser.tabs.remote.sandbox=%s" % options.contentSandbox)
|
||||
|
||||
# get extensions to install
|
||||
extensions = self.getExtensionsToInstall(options)
|
||||
|
Loading…
Reference in New Issue
Block a user