Bug 1335429 - Ensure hyphenation dictionaries are included in the reftest artifact for packaged tests. r=gbrown

This commit is contained in:
Jonathan Kew 2017-07-19 10:10:31 +01:00
Родитель e062cd68d9
Коммит 4192f89a3a
2 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -754,8 +754,6 @@ class RefTest(object):
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):
@ -763,7 +761,10 @@ class RefTest(object):
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"))
hyphDir = os.path.join(profileDir, "hyphenation")
if not os.path.exists(hyphDir):
os.makedirs(hyphDir)
shutil.copy2(abspath, hyphDir)
else:
shutil.copy2(abspath, profileDir)
elif os.path.isdir(abspath):

Просмотреть файл

@ -228,6 +228,8 @@ endif
stage-android: make-stage-dir
$(NSINSTALL) $(topsrcdir)/mobile/android/fonts $(DEPTH)/_tests/reftest
$(NSINSTALL) $(topsrcdir)/mobile/android/fonts $(DEPTH)/_tests/testing/mochitest
$(NSINSTALL) -D $(DEPTH)/_tests/reftest/hyphenation
$(NSINSTALL) $(wildcard $(topsrcdir)/intl/locales/*/hyphenation/*.dic) $(DEPTH)/_tests/reftest/hyphenation
stage-jetpack: make-stage-dir
$(MAKE) -C $(DEPTH)/addon-sdk stage-tests-package