Bug1276560 Package hyphenation-dictionaries separately for reftests r?sebastian
draft
Bug1276560 Package hyphenation-dictionaries separately for reftests r?sebastian
MozReview-Commit-ID: IRvIqGEfc1m
--- a/layout/tools/reftest/mach_commands.py
+++ b/layout/tools/reftest/mach_commands.py
@@ -224,16 +224,23 @@ class ReftestRunner(MozbuildObject):
}
if not kwargs["tests"]:
kwargs["tests"] = [os.path.join(*default_manifest[kwargs["suite"]])]
kwargs["extraProfileFiles"].append(
os.path.join(self.topsrcdir, "mobile", "android", "fonts"))
+ hyphenation_path = os.path.join(self.topsrcdir, "intl", "locales")
+
+ for (dirpath, dirnames, filenames) in os.walk(hyphenation_path):
+ for filename in filenames:
+ if filename.endswith('.dic'):
+ kwargs["extraProfileFiles"].append(os.path.join(dirpath, filename))
+
if not kwargs["httpdPath"]:
kwargs["httpdPath"] = os.path.join(self.tests_dir, "modules")
if not kwargs["symbolsPath"]:
kwargs["symbolsPath"] = os.path.join(self.topobjdir, "crashreporter-symbols")
if not kwargs["xrePath"]:
kwargs["xrePath"] = os.environ.get("MOZ_HOST_BIN")
if not kwargs["app"]:
kwargs["app"] = self.substs["ANDROID_PACKAGE_NAME"]
--- a/layout/tools/reftest/runreftest.py
+++ b/layout/tools/reftest/runreftest.py
@@ -684,22 +684,26 @@ class RefTest(object):
)
finally:
self.cleanup(profileDir)
return status
def copyExtraFilesToProfile(self, options, profile):
"Copy extra files or dirs specified on the command line to the testing profile."
profileDir = profile.profile
+ if not os.path.exists(os.path.join(profileDir, "hyphenation")):
+ os.makedirs(os.path.join(profileDir, "hyphenation"))
for f in options.extraProfileFiles:
abspath = self.getFullPath(f)
if os.path.isfile(abspath):
if os.path.basename(abspath) == 'user.js':
extra_prefs = mozprofile.Preferences.read_prefs(abspath)
profile.set_preferences(extra_prefs)
+ elif os.path.basename(abspath).endswith('.dic'):
+ shutil.copy2(abspath, os.path.join(profileDir, "hyphenation"))
else:
shutil.copy2(abspath, profileDir)
elif os.path.isdir(abspath):
dest = os.path.join(profileDir, os.path.basename(abspath))
shutil.copytree(abspath, dest)
else:
self.log.warning(
"runreftest.py | Failed to copy %s to profile" % abspath)
--- a/testing/mozharness/configs/android/androidarm.py
+++ b/testing/mozharness/configs/android/androidarm.py
@@ -69,16 +69,17 @@ config = {
"--http-port=%(http_port)s",
"--ssl-port=%(ssl_port)s",
"--certificate-path=%(certs_path)s",
"--symbols-path=%(symbols_path)s",
"--quiet",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--extra-profile-file=fonts",
+ "--extra-profile-file=hyphenation",
"--screenshot-on-fail",
],
},
"mochitest-gl": {
"run_filename": "runtestsremote.py",
"testsdir": "mochitest",
"options": [
"--dm_trans=sut",
@@ -159,16 +160,17 @@ config = {
"--devicePort=%(device_port)s",
"--http-port=%(http_port)s",
"--ssl-port=%(ssl_port)s",
"--httpd-path",
"%(modules_dir)s",
"--symbols-path=%(symbols_path)s",
"--total-chunks=16",
"--extra-profile-file=fonts",
+ "--extra-profile-file=hyphenation",
"--suite=reftest",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
],
"tests": ["tests/layout/reftests/reftest.list"],
},
"crashtest": {
"run_filename": "remotereftest.py",
--- a/testing/mozharness/configs/android/androidarm_4_3.py
+++ b/testing/mozharness/configs/android/androidarm_4_3.py
@@ -73,16 +73,17 @@ config = {
"--http-port=%(http_port)s",
"--ssl-port=%(ssl_port)s",
"--certificate-path=%(certs_path)s",
"--symbols-path=%(symbols_path)s",
"--quiet",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--extra-profile-file=fonts",
+ "--extra-profile-file=hyphenation",
"--screenshot-on-fail",
],
},
"mochitest-gl": {
"run_filename": "runtestsremote.py",
"testsdir": "mochitest",
"options": [
"--dm_trans=adb",
@@ -196,16 +197,17 @@ config = {
"--xre-path=%(xre_path)s",
"--utility-path=%(utility_path)s",
"--http-port=%(http_port)s",
"--ssl-port=%(ssl_port)s",
"--httpd-path", "%(modules_dir)s",
"--symbols-path=%(symbols_path)s",
"--total-chunks=16",
"--extra-profile-file=fonts",
+ "--extra-profile-file=hyphenation",
"--suite=reftest",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
],
"tests": ["tests/layout/reftests/reftest.list",],
},
"reftest-debug": {
"run_filename": "remotereftest.py",
@@ -218,16 +220,17 @@ config = {
"--xre-path=%(xre_path)s",
"--utility-path=%(utility_path)s",
"--http-port=%(http_port)s",
"--ssl-port=%(ssl_port)s",
"--httpd-path", "%(modules_dir)s",
"--symbols-path=%(symbols_path)s",
"--total-chunks=48",
"--extra-profile-file=fonts",
+ "--extra-profile-file=hyphenation",
"tests/layout/reftests/reftest.list",
],
},
"crashtest": {
"run_filename": "remotereftest.py",
"testsdir": "reftest",
"options": [
"--app=%(app)s",