Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Commit

Permalink
Bug 711796 - release sanity should use different l10n dashboard URL f…
Browse files Browse the repository at this point in the history
…or final releases. r=aki
  • Loading branch information
Rail Aliiev committed Mar 5, 2012
1 parent 46bce49 commit ed382d7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
20 changes: 14 additions & 6 deletions buildbot-helpers/release_sanity.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[-N|--build-number `buildnumber`]
[-c| --release-config `releaseConfigFile`]
[-w| --whitelist `mozconfig_whitelist`]
[--l10n-dashboad-version version]
-p|--products firefox,fennec master:port
Wrapper script to sanity-check a release. Default behaviour is to check
Expand Down Expand Up @@ -240,14 +241,18 @@ def verify_l10n_changesets(hgHost, l10n_changesets):
error_tally.add('verify_l10n')
return success

def verify_l10n_dashboard(l10n_changesets):
def verify_l10n_dashboard(l10n_changesets, l10n_dashboard_version=None):
"""Checks the l10n-changesets against the l10n dashboard"""
success = True
locales = query_locale_revisions(l10n_changesets)
dash_url = 'https://l10n-stage-sj.mozilla.org/shipping/l10n-changesets?ms=%(version)s' % {
'version': getL10nDashboardVersion(releaseConfig['version'],
releaseConfig['productName']),
}
if l10n_dashboard_version:
l10n_dashboard_version = getL10nDashboardVersion(
l10n_dashboard_version, releaseConfig['productName'],
parse_version=False)
else:
l10n_dashboard_version = getL10nDashboardVersion(
releaseConfig['version'], releaseConfig['productName'])
dash_url = 'https://l10n-stage-sj.mozilla.org/shipping/l10n-changesets?ms=%s' % l10n_dashboard_version
log.info("Comparing l10n changesets on dashboard %s to on-disk %s ..."
% (dash_url, l10n_changesets))
try:
Expand Down Expand Up @@ -345,6 +350,8 @@ def verify_options(cmd_options, config):
help="coma separated list of products")
parser.add_option("-w", "--whitelist", dest="whitelist",
help="whitelist for known mozconfig differences")
parser.add_option("--l10n-dashboad-version", dest="l10n_dashboard_version",
help="Override L10N dashboard version")

options, args = parser.parse_args()
if not options.products:
Expand Down Expand Up @@ -420,7 +427,8 @@ def verify_options(cmd_options, config):
log.error("Error verifying l10n changesets")

#verify that l10n changesets match the dashboard
if not verify_l10n_dashboard(releaseConfig['l10nRevisionFile']):
if not verify_l10n_dashboard(releaseConfig['l10nRevisionFile'],
options.l10n_dashboard_version):
test_success = False
log.error("Error verifying l10n dashboard changesets")

Expand Down
13 changes: 8 additions & 5 deletions lib/python/release/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def getPrettyVersion(version):
version = re.sub(r'rc([0-9]+)$', r' RC \1', version)
return version

def getL10nDashboardVersion(version, product):
def getL10nDashboardVersion(version, product, parse_version=True):
if product == 'firefox':
ret = 'fx'
elif product == 'fennec':
Expand All @@ -18,9 +18,12 @@ def getL10nDashboardVersion(version, product):
elif product == 'seamonkey':
ret = 'sea'

parsed = re.match(ANY_VERSION_REGEX, version)
if parsed.group(1) and parsed.group(1).startswith('b'):
ret = '%s%s_beta_%s' % (ret, version.split(".")[0], parsed.group(1))
else:
if not parse_version:
ret += version
else:
parsed = re.match(ANY_VERSION_REGEX, version)
if parsed.group(1) and parsed.group(1).startswith('b'):
ret = '%s%s_beta_%s' % (ret, version.split(".")[0], parsed.group(1))
else:
ret += version
return ret

0 comments on commit ed382d7

Please sign in to comment.