Skip to content

Commit

Permalink
Bug 1276560 - Package hyphenation-dictionaries separately for reftest…
Browse files Browse the repository at this point in the history
…s. r=sebastian

MozReview-Commit-ID: IRvIqGEfc1m
  • Loading branch information
krishnakannan committed Jul 4, 2016
1 parent 99db978 commit a67f13d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions layout/tools/reftest/mach_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,13 @@ def run_android_test(self, **kwargs):
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"]:
Expand Down
4 changes: 4 additions & 0 deletions layout/tools/reftest/runreftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,12 +689,16 @@ def runSerialTests(self, manifests, options, cmdargs=None):
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):
Expand Down
2 changes: 2 additions & 0 deletions testing/mozharness/configs/android/androidarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--extra-profile-file=fonts",
"--extra-profile-file=hyphenation",
"--screenshot-on-fail",
],
},
Expand Down Expand Up @@ -164,6 +165,7 @@
"--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",
Expand Down
3 changes: 3 additions & 0 deletions testing/mozharness/configs/android/androidarm_4_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--extra-profile-file=fonts",
"--extra-profile-file=hyphenation",
"--screenshot-on-fail",
],
},
Expand Down Expand Up @@ -201,6 +202,7 @@
"--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",
Expand All @@ -223,6 +225,7 @@
"--symbols-path=%(symbols_path)s",
"--total-chunks=48",
"--extra-profile-file=fonts",
"--extra-profile-file=hyphenation",
"tests/layout/reftests/reftest.list",
],
},
Expand Down

0 comments on commit a67f13d

Please sign in to comment.