Bug 1567122 - Enable Fission for AWSY r=perftest-reviewers,stephendonner,sparky

Differential Revision: https://phabricator.services.mozilla.com/D48660

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Marian Raiciof 2019-11-12 14:07:17 +00:00
Родитель 62b6903f65
Коммит 548d1181f8
6 изменённых файлов: 31 добавлений и 2 удалений

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

@ -74,6 +74,7 @@ treeherder:
'tt': 'Telemetry tests'
'tt-1proc': 'Telemetry tests without e10s'
'SY': 'Are we slim yet tests by TaskCluster'
'SY-fis': 'Are we slim yet tests by TaskCluster, fission enabled'
'SYsd': 'Are we slim yet tests by TaskCluster, Stylo disabled'
'SYss': 'Are we slim yet tests by TaskCluster, Stylo sequential'
'VP': 'VideoPuppeteer tests'

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

@ -38,6 +38,7 @@ awsy:
awsy-tp6:
description: "Are we slim yet - tp6 pageset"
variants: ["fission"]
treeherder-symbol: SY(sy-tp6)
run-on-projects:
by-test-platform:
@ -48,6 +49,7 @@ awsy-tp6:
mozharness:
extra-options:
- --tp6
- --enable-fission
awsy-dmd:
description: "Are we slim yet - dmd enabled"

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

@ -87,7 +87,11 @@ class TestMemoryUsage(AwsyTestCase):
self._urls = urls
# Indicate that we're using tp6 in the perf data.
# ENABLE_FISSION is accessed through inheritance:
# MarionetteTestCase :: AwsyTestCase :: TestMemoryUsage
self._extra_opts = ["tp6"]
if TestMemoryUsage.ENABLE_FISSION:
self._extra_opts.append("fission-enabled")
# Now we setup the mitm proxy with our tp6 pageset.
tp6_pageset_manifest = os.path.join(AWSY_PATH, 'tp6-pageset.manifest')

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

@ -75,7 +75,7 @@ class MachCommands(MachCommandBase):
runtime_testvars = {}
for arg in ('webRootDir', 'pageManifest', 'resultsDir', 'entities', 'iterations',
'perTabPause', 'settleWaitTime', 'maxTabs', 'dmd', 'tp6'):
'perTabPause', 'settleWaitTime', 'maxTabs', 'dmd', 'tp6', 'enable_fission'):
if arg in kwargs and kwargs[arg] is not None:
runtime_testvars[arg] = kwargs[arg]
@ -238,6 +238,9 @@ class MachCommands(MachCommandBase):
@CommandArgument('--tp6', group='AWSY', action='store_true',
dest='tp6', default=False,
help='Use the tp6 pageset during testing.')
@CommandArgument('--enable-fission', group='AWSY', action='store_true',
dest='enable_fission', default=False,
help='Enable Fission (site isolation) in Gecko.')
def run_awsy_test(self, tests, **kwargs):
"""mach awsy-test runs the in-tree version of the Are We Slim Yet
(AWSY) tests.

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

@ -286,6 +286,7 @@ class CommonTestCase(unittest.TestCase):
class MarionetteTestCase(CommonTestCase):
match_re = re.compile(r"test_(.*)\.py$")
ENABLE_FISSION = False
def __init__(self, marionette_weakref, fixtures, methodName='runTest',
filepath='', **kwargs):
@ -295,6 +296,18 @@ class MarionetteTestCase(CommonTestCase):
super(MarionetteTestCase, self).__init__(
methodName, marionette_weakref=marionette_weakref, fixtures=fixtures, **kwargs)
fission_in_flags = kwargs.get('enable_fission', False)
fission_in_prefs_args = False
if (kwargs.get('prefs_args') is not None) and \
('fission.autostart=true' in kwargs.get('prefs_args') or
'"fission.autostart=true"' in kwargs.get('prefs_args')):
fission_in_prefs_args = True
# For 'mach awsy-test --tp6' fission is enabled through:
# "--enable-fission" flag on local runs
# or "prefs_args" on treeherder
MarionetteTestCase.ENABLE_FISSION = fission_in_flags or fission_in_prefs_args
@classmethod
def add_tests_to_suite(cls, mod_name, filepath, suite, testloader, marionette,
fixtures, testvars, **kwargs):

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

@ -79,7 +79,13 @@ class AWSY(TestingMixin, MercurialScript, TooltoolMixin, CodeCoverageMixin):
"dest": "tp6",
"default": False,
"help": "Runs tests with the tp6 pageset.",
}]
}],
[["--enable-fission"],
{"action": "store_true",
"dest": "enable_fission",
"default": False,
"help": "Enable Fission (site isolation) in Gecko.",
}],
] + testing_config_options + copy.deepcopy(code_coverage_config_options)