Skip to content
Browse files

Bug 711796 - release sanity should use different l10n dashboard URL f…

…or final releases. r=aki
  • Loading branch information...
1 parent 46bce49 commit ed382d788f36ec61d3caadbd434048b2a1d67660 @rail rail committed
Showing with 22 additions and 11 deletions.
  1. +14 −6 buildbot-helpers/release_sanity.py
  2. +8 −5 lib/python/release/versions.py
View
20 buildbot-helpers/release_sanity.py
@@ -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
@@ -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:
@@ -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:
@@ -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")
View
13 lib/python/release/versions.py
@@ -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':
@@ -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.
Something went wrong with that request. Please try again.