зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1500081 - Use --install-fonts to install fonts for wptrunner, r=automatedtester
This replaces a previous Firefox-only method except on Windows 7 where it seems that we have some issues with the registry. Differential Revision: https://phabricator.services.mozilla.com/D9091 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
358eb27dd0
Коммит
f1018bf278
|
@ -233,6 +233,12 @@ class WebPlatformTest(TestingMixin, MercurialScript, CodeCoverageMixin, AndroidM
|
||||||
if not sys.platform.startswith("linux"):
|
if not sys.platform.startswith("linux"):
|
||||||
cmd += ["--exclude=css"]
|
cmd += ["--exclude=css"]
|
||||||
|
|
||||||
|
if mozinfo.info["os"] == "win" and mozinfo.info["os_version"] == "6.1":
|
||||||
|
# On Windows 7 --install-fonts fails, so fall back to a Firefox-specific codepath
|
||||||
|
self._install_fonts()
|
||||||
|
else:
|
||||||
|
cmd += ["--install-fonts"]
|
||||||
|
|
||||||
for test_type in test_types:
|
for test_type in test_types:
|
||||||
cmd.append("--test-type=%s" % test_type)
|
cmd.append("--test-type=%s" % test_type)
|
||||||
|
|
||||||
|
@ -329,8 +335,6 @@ class WebPlatformTest(TestingMixin, MercurialScript, CodeCoverageMixin, AndroidM
|
||||||
def run_tests(self):
|
def run_tests(self):
|
||||||
dirs = self.query_abs_dirs()
|
dirs = self.query_abs_dirs()
|
||||||
|
|
||||||
self._install_fonts()
|
|
||||||
|
|
||||||
parser = StructuredOutputParser(config=self.config,
|
parser = StructuredOutputParser(config=self.config,
|
||||||
log_obj=self.log_obj,
|
log_obj=self.log_obj,
|
||||||
log_compact=True,
|
log_compact=True,
|
||||||
|
|
|
@ -78,6 +78,7 @@ class WebPlatformTestsRunnerSetup(MozbuildObject):
|
||||||
return kwargs
|
return kwargs
|
||||||
|
|
||||||
def kwargs_firefox(self, kwargs):
|
def kwargs_firefox(self, kwargs):
|
||||||
|
import mozinfo
|
||||||
from wptrunner import wptcommandline
|
from wptrunner import wptcommandline
|
||||||
kwargs = self.kwargs_common(kwargs)
|
kwargs = self.kwargs_common(kwargs)
|
||||||
|
|
||||||
|
@ -90,7 +91,12 @@ class WebPlatformTestsRunnerSetup(MozbuildObject):
|
||||||
if kwargs["webdriver_binary"] is None:
|
if kwargs["webdriver_binary"] is None:
|
||||||
kwargs["webdriver_binary"] = self.get_binary_path("geckodriver", validate_exists=False)
|
kwargs["webdriver_binary"] = self.get_binary_path("geckodriver", validate_exists=False)
|
||||||
|
|
||||||
self.setup_fonts_firefox()
|
|
||||||
|
if mozinfo.info["os"] == "win" and mozinfo.info["os_version"] == "6.1":
|
||||||
|
# On Windows 7 --install-fonts fails, so fall back to a Firefox-specific codepath
|
||||||
|
self.setup_fonts_firefox()
|
||||||
|
else:
|
||||||
|
kwargs["install_fonts"] = True
|
||||||
|
|
||||||
kwargs = wptcommandline.check_args(kwargs)
|
kwargs = wptcommandline.check_args(kwargs)
|
||||||
|
|
||||||
|
@ -141,6 +147,7 @@ class WebPlatformTestsRunnerSetup(MozbuildObject):
|
||||||
dest.write(src.read())
|
dest.write(src.read())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class WebPlatformTestsUpdater(MozbuildObject):
|
class WebPlatformTestsUpdater(MozbuildObject):
|
||||||
"""Update web platform tests."""
|
"""Update web platform tests."""
|
||||||
def setup_logging(self, **kwargs):
|
def setup_logging(self, **kwargs):
|
||||||
|
|
|
@ -150,7 +150,7 @@ def run_tests(config, test_paths, product, **kwargs):
|
||||||
if kwargs["install_fonts"]:
|
if kwargs["install_fonts"]:
|
||||||
env_extras.append(FontInstaller(
|
env_extras.append(FontInstaller(
|
||||||
font_dir=kwargs["font_dir"],
|
font_dir=kwargs["font_dir"],
|
||||||
ahem=os.path.join(kwargs["tests_root"], "fonts/Ahem.ttf")
|
ahem=os.path.join(test_paths["/"]["tests_path"], "fonts/Ahem.ttf")
|
||||||
))
|
))
|
||||||
|
|
||||||
run_info, test_loader = get_loader(test_paths,
|
run_info, test_loader = get_loader(test_paths,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче