Bug 1276560 - Package hyphenation-dictionaries separately for reftests. r=sebastian
authorKrishna <k.krish@yahoo.com>
Tue, 05 Jul 2016 01:00:15 +0800
changeset 303692 d28a755c4014f6148f9fc7d168536c4800190c7f
parent 303691 e27437d7fe35881b13a2f493427cb0e3ba6aeee0
child 303693 652fa69526ff82afbe7b7e6a360709c457fddf19
push id79141
push usercbook@mozilla.com
push dateTue, 05 Jul 2016 14:07:42 +0000
treeherdermozilla-inbound@f08c54971dd1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1276560
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1276560 - Package hyphenation-dictionaries separately for reftests. r=sebastian MozReview-Commit-ID: IRvIqGEfc1m
layout/tools/reftest/mach_commands.py
layout/tools/reftest/runreftest.py
testing/mozharness/configs/android/androidarm.py
testing/mozharness/configs/android/androidarm_4_3.py
--- 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",