2014-09-04 15:52:43 +04:00
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
|
|
|
# Integrates the web-platform-tests test runner with mach.
|
|
|
|
|
2015-06-22 03:39:09 +03:00
|
|
|
from __future__ import absolute_import, unicode_literals, print_function
|
2014-09-04 15:52:43 +04:00
|
|
|
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
|
|
|
from mozbuild.base import (
|
|
|
|
MachCommandBase,
|
|
|
|
MachCommandConditions as conditions,
|
|
|
|
MozbuildObject,
|
|
|
|
)
|
|
|
|
|
|
|
|
from mach.decorators import (
|
|
|
|
CommandProvider,
|
|
|
|
Command,
|
|
|
|
)
|
|
|
|
|
2017-06-19 21:20:41 +03:00
|
|
|
from mach_commands_base import WebPlatformTestsRunner, create_parser_wpt
|
2014-09-04 15:52:43 +04:00
|
|
|
|
|
|
|
|
2017-06-19 21:20:41 +03:00
|
|
|
class WebPlatformTestsRunnerSetup(MozbuildObject):
|
|
|
|
default_log_type = "mach"
|
|
|
|
|
|
|
|
def kwargs_firefox(self, kwargs):
|
2015-06-30 18:38:14 +03:00
|
|
|
from wptrunner import wptcommandline
|
|
|
|
|
2014-09-04 15:52:43 +04:00
|
|
|
build_path = os.path.join(self.topobjdir, 'build')
|
|
|
|
if build_path not in sys.path:
|
|
|
|
sys.path.append(build_path)
|
|
|
|
|
|
|
|
if kwargs["config"] is None:
|
|
|
|
kwargs["config"] = os.path.join(self.topsrcdir, 'testing', 'web-platform', 'wptrunner.ini')
|
|
|
|
|
|
|
|
if kwargs["binary"] is None:
|
2016-11-11 21:09:22 +03:00
|
|
|
kwargs["binary"] = self.get_binary_path()
|
2014-09-04 15:52:43 +04:00
|
|
|
|
|
|
|
if kwargs["prefs_root"] is None:
|
|
|
|
kwargs["prefs_root"] = os.path.join(self.topobjdir, '_tests', 'web-platform', "prefs")
|
|
|
|
|
2015-01-10 13:42:44 +03:00
|
|
|
if kwargs["certutil_binary"] is None:
|
|
|
|
kwargs["certutil_binary"] = self.get_binary_path('certutil')
|
|
|
|
|
2016-11-11 21:09:22 +03:00
|
|
|
if kwargs["stackfix_dir"] is None:
|
2017-09-14 14:07:23 +03:00
|
|
|
kwargs["stackfix_dir"] = self.bindir
|
2016-11-11 21:09:22 +03:00
|
|
|
|
2015-01-10 13:42:44 +03:00
|
|
|
here = os.path.split(__file__)[0]
|
|
|
|
|
2017-06-28 21:34:19 +03:00
|
|
|
if kwargs["exclude"] is None and kwargs["include"] is None and not sys.platform.startswith("linux"):
|
|
|
|
kwargs["exclude"] = ["css"]
|
|
|
|
|
2015-01-10 13:42:44 +03:00
|
|
|
if kwargs["ssl_type"] in (None, "pregenerated"):
|
|
|
|
if kwargs["ca_cert_path"] is None:
|
|
|
|
kwargs["ca_cert_path"] = os.path.join(here, "certs", "cacert.pem")
|
|
|
|
|
|
|
|
if kwargs["host_key_path"] is None:
|
|
|
|
kwargs["host_key_path"] = os.path.join(here, "certs", "web-platform.test.key")
|
|
|
|
|
|
|
|
if kwargs["host_cert_path"] is None:
|
|
|
|
kwargs["host_cert_path"] = os.path.join(here, "certs", "web-platform.test.pem")
|
|
|
|
|
2014-09-04 15:52:43 +04:00
|
|
|
kwargs["capture_stdio"] = True
|
|
|
|
|
2017-06-05 13:30:59 +03:00
|
|
|
if kwargs["webdriver_binary"] is None:
|
2017-06-08 20:15:31 +03:00
|
|
|
kwargs["webdriver_binary"] = self.get_binary_path("geckodriver", validate_exists=False)
|
2017-06-05 13:30:59 +03:00
|
|
|
|
2017-06-01 17:20:11 +03:00
|
|
|
self.setup_fonts_firefox()
|
|
|
|
|
2014-09-04 15:52:43 +04:00
|
|
|
kwargs = wptcommandline.check_args(kwargs)
|
|
|
|
|
2017-08-16 17:42:30 +03:00
|
|
|
return kwargs
|
|
|
|
|
2017-06-19 21:20:41 +03:00
|
|
|
def kwargs_wptrun(self, kwargs):
|
2017-05-23 15:48:29 +03:00
|
|
|
from wptrunner import wptcommandline
|
|
|
|
here = os.path.join(self.topsrcdir, 'testing', 'web-platform')
|
|
|
|
|
|
|
|
kwargs["tests_root"] = os.path.join(here, "tests")
|
|
|
|
|
2017-08-16 17:42:30 +03:00
|
|
|
sys.path.insert(0, kwargs["tests_root"])
|
|
|
|
|
2017-05-23 15:48:29 +03:00
|
|
|
if kwargs["metadata_root"] is None:
|
|
|
|
metadir = os.path.join(here, "products", kwargs["product"])
|
|
|
|
if not os.path.exists(metadir):
|
|
|
|
os.makedirs(metadir)
|
|
|
|
kwargs["metadata_root"] = metadir
|
|
|
|
|
|
|
|
src_manifest = os.path.join(here, "meta", "MANIFEST.json")
|
|
|
|
dest_manifest = os.path.join(kwargs["metadata_root"], "MANIFEST.json")
|
|
|
|
|
|
|
|
if not os.path.exists(dest_manifest) and os.path.exists(src_manifest):
|
|
|
|
with open(src_manifest) as src, open(dest_manifest, "w") as dest:
|
|
|
|
dest.write(src.read())
|
|
|
|
|
2017-08-16 17:42:30 +03:00
|
|
|
from tools.wpt import run
|
|
|
|
|
|
|
|
try:
|
|
|
|
kwargs = run.setup_wptrunner(run.virtualenv.Virtualenv(self.virtualenv_manager.virtualenv_root),
|
|
|
|
**kwargs)
|
|
|
|
except run.WptrunError as e:
|
|
|
|
print(e.message, file=sys.stderr)
|
|
|
|
sys.exit(1)
|
|
|
|
|
|
|
|
return kwargs
|
2017-05-23 15:48:29 +03:00
|
|
|
|
2017-06-01 17:20:11 +03:00
|
|
|
def setup_fonts_firefox(self):
|
|
|
|
# Ensure the Ahem font is available
|
|
|
|
if not sys.platform.startswith("darwin"):
|
|
|
|
font_path = os.path.join(os.path.dirname(self.get_binary_path()), "fonts")
|
|
|
|
else:
|
|
|
|
font_path = os.path.join(os.path.dirname(self.get_binary_path()), os.pardir, "Resources", "res", "fonts")
|
|
|
|
ahem_src = os.path.join(self.topsrcdir, "testing", "web-platform", "tests", "fonts", "Ahem.ttf")
|
|
|
|
ahem_dest = os.path.join(font_path, "Ahem.ttf")
|
|
|
|
if not os.path.exists(ahem_dest) and os.path.exists(ahem_src):
|
2017-08-02 06:35:53 +03:00
|
|
|
with open(ahem_src, "rb") as src, open(ahem_dest, "wb") as dest:
|
2017-06-01 17:20:11 +03:00
|
|
|
dest.write(src.read())
|
|
|
|
|
|
|
|
|
2014-09-04 15:52:43 +04:00
|
|
|
|
|
|
|
class WebPlatformTestsUpdater(MozbuildObject):
|
|
|
|
"""Update web platform tests."""
|
|
|
|
def run_update(self, **kwargs):
|
2015-01-13 12:42:40 +03:00
|
|
|
import update
|
2015-06-30 18:38:14 +03:00
|
|
|
from update import updatecommandline
|
2014-09-04 15:52:43 +04:00
|
|
|
|
|
|
|
if kwargs["config"] is None:
|
|
|
|
kwargs["config"] = os.path.join(self.topsrcdir, 'testing', 'web-platform', 'wptrunner.ini')
|
2016-03-17 14:35:32 +03:00
|
|
|
if kwargs["product"] is None:
|
|
|
|
kwargs["product"] = "firefox"
|
|
|
|
|
2017-04-04 15:53:43 +03:00
|
|
|
|
|
|
|
|
2017-06-16 12:45:55 +03:00
|
|
|
kwargs = updatecommandline.check_args(kwargs)
|
2015-02-04 18:51:10 +03:00
|
|
|
logger = update.setup_logging(kwargs, {"mach": sys.stdout})
|
2014-09-04 15:52:43 +04:00
|
|
|
|
2015-01-13 12:42:40 +03:00
|
|
|
try:
|
|
|
|
update.run_update(logger, **kwargs)
|
2016-10-07 15:28:37 +03:00
|
|
|
except Exception:
|
2015-01-13 12:42:40 +03:00
|
|
|
import pdb
|
|
|
|
import traceback
|
|
|
|
traceback.print_exc()
|
2016-10-07 15:28:37 +03:00
|
|
|
# pdb.post_mortem()
|
2014-09-04 15:52:43 +04:00
|
|
|
|
|
|
|
class WebPlatformTestsReduce(WebPlatformTestsRunner):
|
|
|
|
|
|
|
|
def run_reduce(self, **kwargs):
|
|
|
|
from wptrunner import reduce
|
|
|
|
|
|
|
|
self.setup_kwargs(kwargs)
|
|
|
|
|
|
|
|
kwargs["capture_stdio"] = True
|
|
|
|
logger = reduce.setup_logging(kwargs, {"mach": sys.stdout})
|
|
|
|
tests = reduce.do_reduce(**kwargs)
|
|
|
|
|
|
|
|
if not tests:
|
|
|
|
logger.warning("Test was not unstable")
|
|
|
|
|
|
|
|
for item in tests:
|
|
|
|
logger.info(item.id)
|
|
|
|
|
2015-10-14 21:10:10 +03:00
|
|
|
class WebPlatformTestsCreator(MozbuildObject):
|
|
|
|
template_prefix = """<!doctype html>
|
2015-10-19 17:44:19 +03:00
|
|
|
%(documentElement)s<meta charset=utf-8>
|
2015-10-14 21:10:10 +03:00
|
|
|
"""
|
|
|
|
template_long_timeout = "<meta name=timeout content=long>\n"
|
|
|
|
|
2015-10-19 17:44:19 +03:00
|
|
|
template_body_th = """<title></title>
|
2015-10-14 21:10:10 +03:00
|
|
|
<script src=/resources/testharness.js></script>
|
|
|
|
<script src=/resources/testharnessreport.js></script>
|
|
|
|
<script>
|
|
|
|
|
|
|
|
</script>
|
|
|
|
"""
|
|
|
|
|
2015-10-19 17:44:19 +03:00
|
|
|
template_body_reftest = """<title></title>
|
|
|
|
<link rel=%(match)s href=%(ref)s>
|
|
|
|
"""
|
|
|
|
|
|
|
|
template_body_reftest_wait = """<script src="/common/reftest-wait.js"></script>
|
|
|
|
"""
|
|
|
|
|
|
|
|
def rel_path(self, path):
|
|
|
|
if path is None:
|
|
|
|
return
|
|
|
|
|
|
|
|
abs_path = os.path.normpath(os.path.abspath(path))
|
|
|
|
return os.path.relpath(abs_path, self.topsrcdir)
|
|
|
|
|
|
|
|
def rel_url(self, rel_path):
|
|
|
|
upstream_path = os.path.join("testing", "web-platform", "tests")
|
|
|
|
local_path = os.path.join("testing", "web-platform", "mozilla", "tests")
|
|
|
|
|
|
|
|
if rel_path.startswith(upstream_path):
|
|
|
|
return rel_path[len(upstream_path):].replace(os.path.sep, "/")
|
|
|
|
elif rel_path.startswith(local_path):
|
|
|
|
return "/_mozilla" + rel_path[len(local_path):].replace(os.path.sep, "/")
|
|
|
|
else:
|
|
|
|
return None
|
|
|
|
|
2015-10-14 21:10:10 +03:00
|
|
|
def run_create(self, context, **kwargs):
|
|
|
|
import subprocess
|
|
|
|
|
2015-10-19 17:44:19 +03:00
|
|
|
path = self.rel_path(kwargs["path"])
|
|
|
|
ref_path = self.rel_path(kwargs["ref"])
|
|
|
|
|
|
|
|
if kwargs["ref"]:
|
|
|
|
kwargs["reftest"] = True
|
2015-10-14 21:10:10 +03:00
|
|
|
|
2015-10-19 17:44:19 +03:00
|
|
|
if self.rel_url(path) is None:
|
|
|
|
print("""Test path %s is not in wpt directories:
|
2015-10-14 21:10:10 +03:00
|
|
|
testing/web-platform/tests for tests that may be shared
|
2015-10-19 17:44:19 +03:00
|
|
|
testing/web-platform/mozilla/tests for Gecko-only tests""" % path)
|
2015-10-14 21:10:10 +03:00
|
|
|
return 1
|
|
|
|
|
2015-10-19 17:44:19 +03:00
|
|
|
if ref_path and self.rel_url(ref_path) is None:
|
|
|
|
print("""Reference path %s is not in wpt directories:
|
|
|
|
testing/web-platform/tests for tests that may be shared
|
|
|
|
testing/web-platform/mozilla/tests for Gecko-only tests""" % ref_path)
|
|
|
|
return 1
|
|
|
|
|
|
|
|
|
2015-10-14 21:10:10 +03:00
|
|
|
if os.path.exists(path) and not kwargs["overwrite"]:
|
|
|
|
print("Test path already exists, pass --overwrite to replace")
|
|
|
|
return 1
|
|
|
|
|
2015-10-19 17:44:19 +03:00
|
|
|
if kwargs["mismatch"] and not kwargs["reftest"]:
|
|
|
|
print("--mismatch only makes sense for a reftest")
|
|
|
|
return 1
|
|
|
|
|
|
|
|
if kwargs["wait"] and not kwargs["reftest"]:
|
|
|
|
print("--wait only makes sense for a reftest")
|
|
|
|
return 1
|
|
|
|
|
|
|
|
args = {"documentElement": "<html class=reftest-wait>\n" if kwargs["wait"] else ""}
|
|
|
|
template = self.template_prefix % args
|
2015-10-14 21:10:10 +03:00
|
|
|
if kwargs["long_timeout"]:
|
|
|
|
template += self.template_long_timeout
|
2015-10-19 17:44:19 +03:00
|
|
|
|
|
|
|
if kwargs["reftest"]:
|
|
|
|
args = {"match": "match" if not kwargs["mismatch"] else "mismatch",
|
|
|
|
"ref": self.rel_url(ref_path) if kwargs["ref"] else '""'}
|
|
|
|
template += self.template_body_reftest % args
|
|
|
|
if kwargs["wait"]:
|
|
|
|
template += self.template_body_reftest_wait
|
|
|
|
else:
|
|
|
|
template += self.template_body_th
|
2016-05-12 00:17:47 +03:00
|
|
|
try:
|
|
|
|
os.makedirs(os.path.dirname(path))
|
|
|
|
except OSError:
|
|
|
|
pass
|
2015-10-14 21:10:10 +03:00
|
|
|
with open(path, "w") as f:
|
|
|
|
f.write(template)
|
|
|
|
|
2017-07-03 17:39:20 +03:00
|
|
|
ref_path = kwargs["ref"]
|
|
|
|
if ref_path and not os.path.exists(ref_path):
|
|
|
|
with open(ref_path, "w") as f:
|
|
|
|
f.write(self.template_prefix % {"documentElement": ""})
|
|
|
|
|
2015-10-14 21:10:10 +03:00
|
|
|
if kwargs["no_editor"]:
|
|
|
|
editor = None
|
|
|
|
elif kwargs["editor"]:
|
|
|
|
editor = kwargs["editor"]
|
|
|
|
elif "VISUAL" in os.environ:
|
|
|
|
editor = os.environ["VISUAL"]
|
|
|
|
elif "EDITOR" in os.environ:
|
|
|
|
editor = os.environ["EDITOR"]
|
|
|
|
else:
|
|
|
|
editor = None
|
|
|
|
|
2016-06-07 16:44:52 +03:00
|
|
|
proc = None
|
2015-10-14 21:10:10 +03:00
|
|
|
if editor:
|
2017-07-03 17:39:20 +03:00
|
|
|
if ref_path:
|
|
|
|
path = "%s %s" % (path, ref_path)
|
2015-10-14 21:10:10 +03:00
|
|
|
proc = subprocess.Popen("%s %s" % (editor, path), shell=True)
|
|
|
|
|
2016-06-07 16:44:52 +03:00
|
|
|
if proc:
|
|
|
|
proc.wait()
|
|
|
|
|
2017-09-26 23:13:04 +03:00
|
|
|
context.commands.dispatch("wpt-manifest-update", context)
|
2017-07-03 17:38:10 +03:00
|
|
|
|
2015-10-14 21:10:10 +03:00
|
|
|
|
2016-09-12 17:06:32 +03:00
|
|
|
class WPTManifestUpdater(MozbuildObject):
|
2017-06-05 18:39:45 +03:00
|
|
|
def run_update(self, check_clean=False, rebuild=False, **kwargs):
|
2016-09-13 16:20:20 +03:00
|
|
|
import manifestupdate
|
2016-09-12 17:06:32 +03:00
|
|
|
from wptrunner import wptlogging
|
2016-09-13 16:20:20 +03:00
|
|
|
logger = wptlogging.setup(kwargs, {"mach": sys.stdout})
|
2016-09-12 17:06:32 +03:00
|
|
|
wpt_dir = os.path.abspath(os.path.join(self.topsrcdir, 'testing', 'web-platform'))
|
2017-06-05 18:39:45 +03:00
|
|
|
manifestupdate.update(logger, wpt_dir, check_clean, rebuild)
|
2016-09-12 17:06:32 +03:00
|
|
|
|
|
|
|
|
2018-06-04 15:46:28 +03:00
|
|
|
class WPTManifestDownloader(MozbuildObject):
|
|
|
|
def run_download(self, path=None, tests_root=None, force=False, **kwargs):
|
|
|
|
import manifestdownload
|
|
|
|
from wptrunner import wptlogging
|
|
|
|
logger = wptlogging.setup(kwargs, {"mach": sys.stdout})
|
|
|
|
wpt_dir = os.path.abspath(os.path.join(self.topsrcdir, 'testing', 'web-platform'))
|
|
|
|
manifestdownload.run(logger, wpt_dir, self.topsrcdir, force)
|
|
|
|
|
|
|
|
|
2015-06-30 18:38:14 +03:00
|
|
|
def create_parser_update():
|
|
|
|
from update import updatecommandline
|
|
|
|
return updatecommandline.create_parser()
|
|
|
|
|
|
|
|
def create_parser_reduce():
|
|
|
|
from wptrunner import wptcommandline
|
|
|
|
return wptcommandline.create_parser_reduce()
|
|
|
|
|
2015-10-14 21:10:10 +03:00
|
|
|
def create_parser_create():
|
|
|
|
import argparse
|
|
|
|
p = argparse.ArgumentParser()
|
|
|
|
p.add_argument("--no-editor", action="store_true",
|
|
|
|
help="Don't try to open the test in an editor")
|
|
|
|
p.add_argument("-e", "--editor", action="store", help="Editor to use")
|
|
|
|
p.add_argument("--long-timeout", action="store_true",
|
|
|
|
help="Test should be given a long timeout (typically 60s rather than 10s, but varies depending on environment)")
|
|
|
|
p.add_argument("--overwrite", action="store_true",
|
|
|
|
help="Allow overwriting an existing test file")
|
2015-10-19 17:44:19 +03:00
|
|
|
p.add_argument("-r", "--reftest", action="store_true",
|
|
|
|
help="Create a reftest rather than a testharness (js) test"),
|
2017-07-03 17:39:20 +03:00
|
|
|
p.add_argument("-m", "--reference", dest="ref", help="Path to the reference file")
|
2015-10-19 17:44:19 +03:00
|
|
|
p.add_argument("--mismatch", action="store_true",
|
|
|
|
help="Create a mismatch reftest")
|
|
|
|
p.add_argument("--wait", action="store_true",
|
|
|
|
help="Create a reftest that waits until takeScreenshot() is called")
|
2015-10-14 21:10:10 +03:00
|
|
|
p.add_argument("path", action="store", help="Path to the test file")
|
|
|
|
return p
|
|
|
|
|
|
|
|
|
2016-09-13 16:20:20 +03:00
|
|
|
def create_parser_manifest_update():
|
|
|
|
import manifestupdate
|
|
|
|
return manifestupdate.create_parser()
|
|
|
|
|
2018-06-04 15:46:28 +03:00
|
|
|
def create_parser_manifest_download():
|
|
|
|
import manifestdownload
|
|
|
|
return manifestdownload.create_parser()
|
|
|
|
|
2016-09-13 16:20:20 +03:00
|
|
|
|
2014-09-04 15:52:43 +04:00
|
|
|
@CommandProvider
|
|
|
|
class MachCommands(MachCommandBase):
|
2016-09-13 16:20:20 +03:00
|
|
|
def setup(self):
|
|
|
|
self._activate_virtualenv()
|
|
|
|
|
2014-09-04 15:52:43 +04:00
|
|
|
@Command("web-platform-tests",
|
|
|
|
category="testing",
|
|
|
|
conditions=[conditions.is_firefox],
|
2015-06-30 18:38:14 +03:00
|
|
|
parser=create_parser_wpt)
|
2014-09-04 15:52:43 +04:00
|
|
|
def run_web_platform_tests(self, **params):
|
|
|
|
self.setup()
|
2015-05-28 22:27:23 +03:00
|
|
|
|
|
|
|
if "test_objects" in params:
|
|
|
|
for item in params["test_objects"]:
|
|
|
|
params["include"].append(item["name"])
|
|
|
|
del params["test_objects"]
|
|
|
|
|
2017-06-19 21:20:41 +03:00
|
|
|
wpt_setup = self._spawn(WebPlatformTestsRunnerSetup)
|
|
|
|
wpt_runner = WebPlatformTestsRunner(wpt_setup)
|
|
|
|
return wpt_runner.run(**params)
|
2014-09-04 15:52:43 +04:00
|
|
|
|
2016-09-12 17:10:55 +03:00
|
|
|
@Command("wpt",
|
|
|
|
category="testing",
|
|
|
|
conditions=[conditions.is_firefox],
|
|
|
|
parser=create_parser_wpt)
|
|
|
|
def run_wpt(self, **params):
|
|
|
|
return self.run_web_platform_tests(**params)
|
|
|
|
|
2014-09-04 15:52:43 +04:00
|
|
|
@Command("web-platform-tests-update",
|
|
|
|
category="testing",
|
2015-06-30 18:38:14 +03:00
|
|
|
parser=create_parser_update)
|
2014-09-04 15:52:43 +04:00
|
|
|
def update_web_platform_tests(self, **params):
|
|
|
|
self.setup()
|
2018-05-10 17:39:14 +03:00
|
|
|
self.virtualenv_manager.install_pip_package('html5lib==1.0.1')
|
|
|
|
self.virtualenv_manager.install_pip_package('ujson')
|
2015-01-13 12:42:40 +03:00
|
|
|
self.virtualenv_manager.install_pip_package('requests')
|
2014-09-04 15:52:43 +04:00
|
|
|
wpt_updater = self._spawn(WebPlatformTestsUpdater)
|
|
|
|
return wpt_updater.run_update(**params)
|
|
|
|
|
2016-09-12 17:10:55 +03:00
|
|
|
@Command("wpt-update",
|
|
|
|
category="testing",
|
|
|
|
parser=create_parser_update)
|
|
|
|
def update_wpt(self, **params):
|
|
|
|
return self.update_web_platform_tests(**params)
|
|
|
|
|
2014-09-04 15:52:43 +04:00
|
|
|
@Command("web-platform-tests-reduce",
|
|
|
|
category="testing",
|
|
|
|
conditions=[conditions.is_firefox],
|
2015-06-30 18:38:14 +03:00
|
|
|
parser=create_parser_reduce)
|
2014-09-04 15:52:43 +04:00
|
|
|
def unstable_web_platform_tests(self, **params):
|
|
|
|
self.setup()
|
|
|
|
wpt_reduce = self._spawn(WebPlatformTestsReduce)
|
|
|
|
return wpt_reduce.run_reduce(**params)
|
2015-10-14 21:10:10 +03:00
|
|
|
|
2016-09-12 17:10:55 +03:00
|
|
|
@Command("wpt-reduce",
|
|
|
|
category="testing",
|
|
|
|
conditions=[conditions.is_firefox],
|
|
|
|
parser=create_parser_reduce)
|
|
|
|
def unstable_wpt(self, **params):
|
|
|
|
return self.unstable_web_platform_tests(**params)
|
|
|
|
|
2015-10-14 21:10:10 +03:00
|
|
|
@Command("web-platform-tests-create",
|
|
|
|
category="testing",
|
|
|
|
parser=create_parser_create)
|
|
|
|
def create_web_platform_test(self, **params):
|
|
|
|
self.setup()
|
|
|
|
wpt_creator = self._spawn(WebPlatformTestsCreator)
|
|
|
|
wpt_creator.run_create(self._mach_context, **params)
|
2016-09-12 17:06:32 +03:00
|
|
|
|
2016-09-12 17:10:55 +03:00
|
|
|
@Command("wpt-create",
|
|
|
|
category="testing",
|
|
|
|
parser=create_parser_create)
|
|
|
|
def create_wpt(self, **params):
|
|
|
|
return self.create_web_platform_test(**params)
|
|
|
|
|
2016-09-12 17:06:32 +03:00
|
|
|
@Command("wpt-manifest-update",
|
2016-09-13 16:20:20 +03:00
|
|
|
category="testing",
|
|
|
|
parser=create_parser_manifest_update)
|
|
|
|
def wpt_manifest_update(self, **params):
|
2016-09-12 17:06:32 +03:00
|
|
|
self.setup()
|
|
|
|
wpt_manifest_updater = self._spawn(WPTManifestUpdater)
|
2016-09-13 16:20:20 +03:00
|
|
|
return wpt_manifest_updater.run_update(**params)
|
2018-06-04 15:46:28 +03:00
|
|
|
|
|
|
|
|
|
|
|
@Command("wpt-manifest-download",
|
|
|
|
category="testing",
|
|
|
|
parser=create_parser_manifest_download)
|
|
|
|
def wpt_manifest_download(self, **params):
|
|
|
|
self.setup()
|
|
|
|
wpt_manifest_downloader = self._spawn(WPTManifestDownloader)
|
|
|
|
return wpt_manifest_downloader.run_download(**params)
|