Bug 1197365 - Enable e10s for web-platform-tests, r=ahal,Ms2ger

This commit is contained in:
James Graham 2015-08-27 18:45:50 +01:00
Родитель 2e5e264e67
Коммит 95ed9487e0
6 изменённых файлов: 33 добавлений и 10 удалений

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

@ -26,6 +26,11 @@ class WebPlatformTest(TestingMixin, MercurialScript, BlobUploadMixin):
"dest": "test_type",
"help": "Specify the test types to run."}
],
[['--e10s'], {
"action": "store_true",
"dest": "e10s",
"help": "Run with e10s enabled"}
],
[["--total-chunks"], {
"action": "store",
"dest": "total_chunks",
@ -128,6 +133,9 @@ class WebPlatformTest(TestingMixin, MercurialScript, BlobUploadMixin):
for test_type in c.get("test_type", []):
base_cmd.append("--test-type=%s" % test_type)
if c.get("e10s"):
base_cmd.append("--e10s")
for opt in ["total_chunks", "this_chunk"]:
val = c.get(opt)
if val:

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

@ -27,7 +27,8 @@ __wptrunner__ = {"product": "firefox",
"reftest": "MarionetteRefTestExecutor"},
"browser_kwargs": "browser_kwargs",
"executor_kwargs": "executor_kwargs",
"env_options": "env_options"}
"env_options": "env_options",
"run_info_extras": "run_info_extras"}
def check_args(**kwargs):
@ -64,6 +65,8 @@ def env_options():
"certificate_domain": "web-platform.test",
"supports_debugger": True}
def run_info_extras(**kwargs):
return {"e10s": kwargs["gecko_e10s"]}
class FirefoxBrowser(Browser):
used_ports = set()

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

@ -329,7 +329,7 @@ def group_conditionals(values):
properties = set(item[0] for item in by_property.iterkeys())
prop_order = ["debug", "os", "version", "processor", "bits"]
prop_order = ["debug", "e10s", "os", "version", "processor", "bits"]
include_props = []
for prop in prop_order:
@ -356,7 +356,7 @@ def make_expr(prop_set, status):
assert len(prop_set) > 0
no_value_props = set(["debug"])
no_value_props = set(["debug", "e10s"])
expressions = []
for prop, value in prop_set:

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

@ -43,6 +43,8 @@ def load_product(config, product):
browser_kwargs = getattr(module, data["browser_kwargs"])
executor_kwargs = getattr(module, data["executor_kwargs"])
env_options = getattr(module, data["env_options"])()
run_info_extras = (getattr(module, data["run_info_extras"])
if "run_info_extras" in data else lambda **kwargs:{})
executor_classes = {}
for test_type, cls_name in data["executor"].iteritems():
@ -52,4 +54,4 @@ def load_product(config, product):
return (check_args,
browser_cls, browser_kwargs,
executor_classes, executor_kwargs,
env_options)
env_options, run_info_extras)

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

@ -40,8 +40,12 @@ def setup_logging(*args, **kwargs):
global logger
logger = wptlogging.setup(*args, **kwargs)
def get_loader(test_paths, product, ssl_env, debug=None, **kwargs):
run_info = wpttest.get_run_info(kwargs["run_info"], product, debug=debug)
def get_loader(test_paths, product, ssl_env, debug=None, run_info_extras=None, **kwargs):
if run_info_extras is None:
run_info_extras = {}
run_info = wpttest.get_run_info(kwargs["run_info"], product, debug=debug,
extras=run_info_extras)
test_manifests = testloader.ManifestLoader(test_paths, force_manifest_update=kwargs["manifest_update"]).load()
@ -111,17 +115,21 @@ def run_tests(config, test_paths, product, **kwargs):
(check_args,
browser_cls, get_browser_kwargs,
executor_classes, get_executor_kwargs,
env_options) = products.load_product(config, product)
env_options, run_info_extras) = products.load_product(config, product)
ssl_env = env.ssl_env(logger, **kwargs)
check_args(**kwargs)
if "test_loader" in kwargs:
run_info = wpttest.get_run_info(kwargs["run_info"], product, debug=None)
run_info = wpttest.get_run_info(kwargs["run_info"], product, debug=None,
extras=run_info_extras(**kwargs))
test_loader = kwargs["test_loader"]
else:
run_info, test_loader = get_loader(test_paths, product, ssl_env,
run_info, test_loader = get_loader(test_paths,
product,
ssl_env,
run_info_extras=run_info_extras(**kwargs),
**kwargs)
if kwargs["run_by_dir"] is False:

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

@ -57,7 +57,7 @@ def get_run_info(metadata_root, product, **kwargs):
class RunInfo(dict):
def __init__(self, metadata_root, product, debug):
def __init__(self, metadata_root, product, debug, extras=None):
self._update_mozinfo(metadata_root)
self.update(mozinfo.info)
self["product"] = product
@ -66,6 +66,8 @@ class RunInfo(dict):
elif "debug" not in self:
# Default to release
self["debug"] = False
if extras is not None:
self.update(extras)
def _update_mozinfo(self, metadata_root):
"""Add extra build information from a mozinfo.json file in a parent