Bug 1558598 - Ensure mozinfo correctly detects WebRender. r=ahal

I don't know if this covers all the things that use mozinfo (probably not)
but it covers all the suites that use mozinfo and have webrender conditions
in the test manifests (i.e. mochitest and wpt variants).

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kartikaya Gupta 2019-06-29 09:51:14 +00:00
parent 276b570b4d
commit 721a5dbcf4
6 changed files with 15 additions and 3 deletions

View File

@ -167,3 +167,10 @@ topsrcdir
The path to the source directory the build came from.
Always defined.
webrender
Whether or not WebRender is enabled as the Gecko compositor.
Values are ``true`` and ``false``.
Always defined.

View File

@ -2594,6 +2594,7 @@ toolbar#nav-bar {
'dom.serviceWorkers.parent_intercept', False),
"socketprocess_e10s": self.extraPrefs.get(
'network.process.enabled', False),
"webrender": options.enable_webrender,
})
self.setTestRoot(options)

View File

@ -66,7 +66,7 @@ info = {'os': unknown,
'os_version': unknown,
'bits': unknown,
'has_sandbox': unknown,
'webrender': bool(os.environ.get("MOZ_WEBRENDER", False)),
'webrender': False,
'automation': bool(os.environ.get("MOZ_AUTOMATION", False)),
}
(system, node, release, version, machine, processor) = platform.uname()

View File

@ -52,7 +52,8 @@ def get_loader(test_paths, product, debug=None, run_info_extras=None, **kwargs):
browser_channel=kwargs.get("browser_channel"),
verify=kwargs.get("verify"),
debug=debug,
extras=run_info_extras)
extras=run_info_extras,
enable_webrender=kwargs.get("enable_webrender"))
test_manifests = testloader.ManifestLoader(test_paths, force_manifest_update=kwargs["manifest_update"],
manifest_download=kwargs["manifest_download"]).load()

View File

@ -72,7 +72,8 @@ class RunInfo(dict):
browser_version=None,
browser_channel=None,
verify=None,
extras=None):
extras=None,
enable_webrender=False):
import mozinfo
self._update_mozinfo(metadata_root)
self.update(mozinfo.info)
@ -102,6 +103,7 @@ class RunInfo(dict):
self["wasm"] = False
if extras is not None:
self.update(extras)
self["webrender"] = enable_webrender
def _update_mozinfo(self, metadata_root):
"""Add extra build information from a mozinfo.json file in a parent

View File

@ -1217,6 +1217,7 @@ class XPCShellTests(object):
self.mozInfo['fission'] = prefs.get('fission.autostart', False)
self.mozInfo['serviceworker_e10s'] = prefs.get(
'dom.serviceWorkers.parent_intercept', False)
self.mozInfo['webrender'] = self.enable_webrender
mozinfo.update(self.mozInfo)