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

Commit

Permalink
bug 697611: release_sanity.py should check in-tree mozconfigs if they…
Browse files Browse the repository at this point in the history
… exist. r=lsblakk
  • Loading branch information
bhearsum committed Feb 1, 2012
1 parent 6bec009 commit f76ab63
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions buildbot-helpers/release_sanity.py
Expand Up @@ -96,7 +96,7 @@ def verify_repo(branch, revision, hghost):
error_tally.add('verify_repo') error_tally.add('verify_repo')
return success return success


def verify_mozconfigs(branch, version, hghost, product, platforms, whitelist=None): def verify_mozconfigs(branch, revision, hghost, product, mozconfigs, appName, whitelist=None):
"""Compare nightly mozconfigs for branch to release mozconfigs and compare to whitelist of known differences""" """Compare nightly mozconfigs for branch to release mozconfigs and compare to whitelist of known differences"""
if whitelist: if whitelist:
mozconfigWhitelist = readConfig(whitelist, ['whitelist']) mozconfigWhitelist = readConfig(whitelist, ['whitelist'])
Expand All @@ -105,14 +105,14 @@ def verify_mozconfigs(branch, version, hghost, product, platforms, whitelist=Non
log.info("Comparing %s mozconfigs to nightly mozconfigs..." % product) log.info("Comparing %s mozconfigs to nightly mozconfigs..." % product)
success = True success = True
types = {'+': 'release', '-': 'nightly'} types = {'+': 'release', '-': 'nightly'}
tag = ''.join([product.upper(), "_", version.replace('.','_'), "_RELEASE"]) for platform,mozconfig in mozconfigs.items():
for platform in platforms:
urls = [] urls = []
mozconfigs = [] mozconfigs = []
for type in types.values(): # Create links to the two mozconfigs.
urls.append(make_hg_url(hghost, 'build/buildbot-configs', 'http', releaseConfig = make_hg_url(hghost, branch, 'http', revision, mozconfig)
tag, os.path.join('mozilla2', platform, urls.append(releaseConfig)
branch, type,'mozconfig'))) # The nightly one is the exact same URL, with the file part changed.
urls.append(releaseConfig.rstrip('release') + 'nightly')
for url in urls: for url in urls:
try: try:
mozconfigs.append(urllib2.urlopen(url).readlines()) mozconfigs.append(urllib2.urlopen(url).readlines())
Expand Down Expand Up @@ -362,11 +362,12 @@ def verify_options(cmd_options, config):


# verify that mozconfigs for this release pass diff with nightly, compared to a whitelist # verify that mozconfigs for this release pass diff with nightly, compared to a whitelist
if not verify_mozconfigs( if not verify_mozconfigs(
options.branch, releaseConfig['sourceRepositories']['mozilla']['path'],
options.version, releaseConfig['sourceRepositories']['mozilla']['revision'],
branchConfig['hghost'], branchConfig['hghost'],
releaseConfig['productName'], releaseConfig['productName'],
releaseConfig['enUSPlatforms'], releaseConfig['mozconfigs'],
releaseConfig['appName'],
options.whitelist options.whitelist
): ):
test_success = False test_success = False
Expand Down

0 comments on commit f76ab63

Please sign in to comment.