mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 1357867 - add support for 'ignore-locales' in tc l10n jobs. r=dustin
MozReview-Commit-ID: ENKm5mOG3BH --HG-- extra : rebase_source : 64cc6ec7cf898f7286304ea98a54fa5021d2992e
This commit is contained in:
parent
f5453a325a
commit
4161e76ebc
@ -28,6 +28,11 @@ job-template:
|
||||
by-build-platform:
|
||||
default: browser/locales/all-locales
|
||||
android-api-15-l10n: mobile/locales/l10n-changesets.json
|
||||
ignore-locales:
|
||||
by-build-platform:
|
||||
# OSX has a special locale for japanese
|
||||
macosx64.*: [ja]
|
||||
default: [ja-JP-mac]
|
||||
run-time:
|
||||
by-build-platform:
|
||||
default: 36000
|
||||
|
@ -32,6 +32,11 @@ job-template:
|
||||
- mozilla-central
|
||||
- mozilla-aurora
|
||||
- mozilla-beta
|
||||
ignore-locales:
|
||||
by-build-platform:
|
||||
# OSX has a special locale for japanese
|
||||
macosx64.*: [ja]
|
||||
default: [ja-JP-mac]
|
||||
run-time:
|
||||
by-build-platform:
|
||||
default: 36000
|
||||
|
@ -51,6 +51,9 @@ l10n_description_schema = Schema({
|
||||
# max run time of the task
|
||||
Required('run-time'): _by_platform(int),
|
||||
|
||||
# Locales not to repack for
|
||||
Required('ignore-locales'): _by_platform([basestring]),
|
||||
|
||||
# All l10n jobs use mozharness
|
||||
Required('mozharness'): {
|
||||
# Script to invoke for mozharness
|
||||
@ -150,11 +153,11 @@ def _parse_locales_file(locales_file, platform=None):
|
||||
return locales
|
||||
|
||||
|
||||
def _remove_ja_jp_mac_locale(locales):
|
||||
def _remove_locales(locales, to_remove=None):
|
||||
# ja-JP-mac is a mac-only locale, but there are no mac builds being repacked,
|
||||
# so just omit it unconditionally
|
||||
return {
|
||||
locale: revision for locale, revision in locales.items() if locale != 'ja-JP-mac'
|
||||
locale: revision for locale, revision in locales.items() if locale not in to_remove
|
||||
}
|
||||
|
||||
|
||||
@ -225,6 +228,7 @@ def handle_keyed_by(config, jobs):
|
||||
"run-time",
|
||||
"tooltool",
|
||||
"env",
|
||||
"ignore-locales",
|
||||
"mozharness.config",
|
||||
"mozharness.options",
|
||||
"mozharness.actions",
|
||||
@ -246,7 +250,8 @@ def handle_keyed_by(config, jobs):
|
||||
def all_locales_attribute(config, jobs):
|
||||
for job in jobs:
|
||||
locales_with_changesets = _parse_locales_file(job["locales-file"])
|
||||
locales_with_changesets = _remove_ja_jp_mac_locale(locales_with_changesets)
|
||||
locales_with_changesets = _remove_locales(locales_with_changesets,
|
||||
to_remove=job['ignore-locales'])
|
||||
|
||||
locales = sorted(locales_with_changesets.keys())
|
||||
attributes = job.setdefault('attributes', {})
|
||||
|
Loading…
Reference in New Issue
Block a user