Permalink
Browse files

Merging from default

changeset:   2983:3b9199d4330a
parent:      2981:e7a1cf273833
parent:      2982:4312b2cca45b
user:        Justin Wood <Callek@gmail.com>
date:        Thu Feb 07 17:49:14 2013 -0500
summary:     Merge production-0.8 --> default

changeset:   2984:9b23b69f1947
user:        Mark Banner <bugzilla@standard8.plus.com>
date:        Fri Feb 08 16:21:28 2013 +0000
summary:     Backout unneeded change to misc.py from bug 837146 (leak_target change not needed).

changeset:   2985:43d91fd84700
user:        Aki Sasaki <asasaki@mozilla.com>
date:        Fri Feb 08 11:09:48 2013 -0800
summary:     bug 793022 - kill unused enable_mobile_unittests support. r=rail

changeset:   2986:b3ba4d217f62
user:        Joel Maher <jmaher@mozilla.com>
date:        Fri Feb 08 15:04:41 2013 -0500
summary:     Bug 839569 - mozbase modules from tests.zip are not extracted during test time. r=armenzg

changeset:   2987:2f4fefd41e38
tag:         tip
user:        Ben Hearsum <bhearsum@mozilla.com>
date:        Mon Feb 11 11:55:10 2013 -0500
summary:     bug 827306: ensure that non-release build dirs are the same length as release build dirs. r=catlee

--HG--
branch : production-0.8
  • Loading branch information...
2 parents a9b6a3b + a3de7f8 commit 77ff5329a2c10df047a9ca31e0f5e9f7dfc35586 @rail rail committed Feb 11, 2013
Showing with 77 additions and 21 deletions.
  1. +35 −9 common.py
  2. +10 −9 misc.py
  3. +0 −1 process/factory.py
  4. +3 −1 process/release.py
  5. +1 −1 steps/misc.py
  6. +28 −0 test/test_common.py
View
@@ -46,7 +46,13 @@ def incrementBuildID(buildID):
return genBuildID(epoch + 1)
-def normalizeName(name, product=None):
+def normalizeName(name, product=None, min_=30, max_=30, filler='0'):
+ """Shortens names and normalizes them within specified minimum
+ and maximum lengths. If names need lengthening, 'filler' is
+ appended until they reach the minimum length.
+ See https://bugzilla.mozilla.org/show_bug.cgi?id=827306 for background.
+ """
+ origName = name
prefix = ''
if product != None and 'thunderbird' in product:
prefix = 'tb-'
@@ -63,16 +69,16 @@ def normalizeName(name, product=None):
'shadow': 'sh',
'mobile': 'mb',
'desktop': '',
- 'debug': 'dbg',
+ 'debug': 'd',
'xulrunner': 'xr',
'build': 'bld',
- 'linux': 'lnx',
+ 'linux': 'lx',
'win32': 'w32',
'win64': 'w64',
'macosx': 'osx',
'macosx64': 'osx64',
- 'linux64': 'lnx64',
- 'android': 'andrd',
+ 'linux64': 'l64',
+ 'android': 'and',
'release': 'rel',
'mochitest': 'm',
'browser-chrome': 'b-c',
@@ -100,6 +106,19 @@ def normalizeName(name, product=None):
'private-browsing': 'pb',
'gecko': 'g',
'localizer': 'lz',
+ 'blocklistupdate': 'blu',
+ 'armv6': 'a6',
+ 'armv7a': 'a7',
+ 'ionmonkey': 'ion',
+ 'system': 'sys',
+ 'panda': 'p',
+ 'b2g18': 'b18',
+ 'v1_0_0': '100',
+ 'v1_0_1': '101',
+ 'standalone': 'sa',
+ 'thunderbird': 'tb',
+ 'checksums': 'sums',
+ 'update_verify': 'uv',
}
for word, replacement in mappings.iteritems():
# Regexes are slow, so make sure the word is there at all before
@@ -113,7 +132,14 @@ def normalizeName(name, product=None):
# or a separator atfer them
)
name = regex.sub(r'\1%s\2' % replacement, name)
- # Not sure why we do this, but apparently we replace all the underscores
- # with hyphens...
- name = name.replace('_', '-')
- return prefix + name
+ name = prefix + name
+ if len(name) > max_:
+ msg = 'Cannot shorten "%s" to maximum length (%d). Got to: %s' % (
+ origName, max_, name)
+ raise ValueError(msg)
+ # Add a seperator before the padding if necessary
+ if len(name) < min_:
+ name += '-'
+ while len(name) < min_:
+ name += filler
+ return name
View
19 misc.py
@@ -33,6 +33,7 @@
import buildbotcustom.misc_scheduler
import build.paths
import mozilla_buildtools.queuedir
+reload(buildbotcustom.common)
reload(buildbotcustom.changes.hgpoller)
reload(buildbotcustom.process.factory)
reload(buildbotcustom.log)
@@ -1107,8 +1108,8 @@ def generateBranchObjects(config, name, secrets=None):
if config.get('mozilla_dir'):
extra_args['mozillaDir'] = config['mozilla_dir']
- if pf.get('leak_target'):
- extra_args['leakTarget'] = pf['leak_target']
+ if config.get('leak_target'):
+ extra_args['leakTarget'] = config['leak_target']
multiargs = {}
if pf.get('product_name') == 'b2g':
@@ -1535,19 +1536,20 @@ def generateBranchObjects(config, name, secrets=None):
**l10n_kwargs
)
# eg. Thunderbird comm-aurora linux l10n nightly
+ slavebuilddir = normalizeName('%s-%s-l10n-nightly' % (name, platform), pf['stage_product'], max_=50)
mozilla2_l10n_nightly_builder = {
'name': l10nNightlyBuilders[nightly_builder]['l10n_builder'],
'slavenames': pf.get('l10n_slaves', pf['slaves']),
'builddir': '%s-%s-l10n-nightly' % (name, platform),
- 'slavebuilddir': normalizeName('%s-%s-l10n-nightly' % (name, platform), pf['stage_product']),
+ 'slavebuilddir': slavebuilddir,
'factory': mozilla2_l10n_nightly_factory,
'category': name,
'nextSlave': _nextSlowSlave,
'properties': {'branch': name,
'platform': platform,
'product': pf['stage_product'],
'stage_platform': stage_platform,
- 'slavebuilddir': normalizeName('%s-%s-l10n-nightly' % (name, platform), pf['stage_product']), },
+ 'slavebuilddir': slavebuilddir},
}
branchObjects['builders'].append(
mozilla2_l10n_nightly_builder)
@@ -1633,19 +1635,20 @@ def generateBranchObjects(config, name, secrets=None):
**dep_kwargs
)
# eg. Thunderbird comm-central linux l10n dep
+ slavebuilddir = normalizeName('%s-%s-l10n-dep' % (name, platform), pf['stage_product'], max_=50)
mozilla2_l10n_dep_builder = {
'name': l10nBuilders[pf['base_name']]['l10n_builder'],
'slavenames': pf.get('l10n_slaves', pf['slaves']),
'builddir': '%s-%s-l10n-dep' % (name, platform),
- 'slavebuilddir': normalizeName('%s-%s-l10n-dep' % (name, platform), pf['stage_product']),
+ 'slavebuilddir': slavebuilddir,
'factory': mozilla2_l10n_dep_factory,
'category': name,
'nextSlave': _nextSlowSlave,
'properties': {'branch': name,
'platform': platform,
'stage_platform': stage_platform,
'product': pf['stage_product'],
- 'slavebuilddir': normalizeName('%s-%s-l10n-dep' % (name, platform), pf['stage_product'])},
+ 'slavebuilddir': slavebuilddir},
}
branchObjects['builders'].append(mozilla2_l10n_dep_builder)
@@ -1943,8 +1946,6 @@ def generateTalosBranchObjects(branch, branch_config, PLATFORMS, SUITES,
testTypes.append('opt')
if branch_config['platforms'][platform].get('enable_debug_unittests'):
testTypes.append('debug')
- if branch_config['platforms'][platform].get('enable_mobile_unittests'):
- testTypes.append('mobile')
merge_tests = branch_config.get('enable_merging', True)
@@ -2420,7 +2421,7 @@ def generateSpiderMonkeyObjects(project, config, SLAVES):
builder = {'name': name,
'builddir': '%s_%s_spidermonkey-%s' % (branch, platform, variant),
- 'slavebuilddir': normalizeName('%s_%s_spidermonkey-%s' % (branch, platform, variant)),
+ 'slavebuilddir': normalizeName('%s_%s_spidermonkey-%s' % (branch, platform, variant), max_=50),
'slavenames': pf['slaves'],
'nextSlave': _nextSlowIdleSlave(config['idle_slaves']),
'factory': f,
View
@@ -33,7 +33,6 @@
import build.paths
import release.info
import release.paths
-reload(buildbotcustom.common)
reload(buildbotcustom.status.errors)
reload(buildbotcustom.steps.base)
reload(buildbotcustom.steps.misc)
View
@@ -796,13 +796,15 @@ def getMessageId():
'slavenames': pf.get('l10n_slaves', pf['slaves']),
'category': builderPrefix(''),
'builddir': builderPrefix("standalone_repack", platform),
+ 'slavebuilddir': normalizeName(builderPrefix(
+ 'standalone_repack', platform), releaseConfig['productName']),
'factory': standalone_factory,
'nextSlave': _nextFastSlave,
'env': env,
'properties': {
'builddir': builderPrefix("standalone_repack", platform),
'slavebuilddir': normalizeName(builderPrefix(
- "standalone_repack", platform)),
+ "standalone_repack", platform), releaseConfig['productName']),
'platform': platform,
'branch': 'release-%s' % sourceRepoInfo['name'],
}
View
@@ -271,7 +271,7 @@ def start(self):
filename = self.build.getProperties().render(self.filename)
self.filename = filename
if filename.endswith(".zip"):
- args = ['unzip', '-oq', filename, 'bin*', 'certs*', 'modules*']
+ args = ['unzip', '-oq', filename, 'mozbase*', 'bin*', 'certs*', 'modules*']
# modify the commands to extract only the files we need - the test
# directory and bin/ and certs/
View
@@ -0,0 +1,28 @@
+import unittest
+
+from buildbotcustom.common import normalizeName
+
+
+class TestNormalizeName(unittest.TestCase):
+ def testNoPrefix(self):
+ self.assertEquals(normalizeName('mozilla-beta', min_=1), 'm-beta')
+
+ def testPrefix(self):
+ self.assertEquals(normalizeName('comm-release', product='thunderbird', min_=1), 'tb-c-rel')
+
+ def testExclusiveWordReplacement(self):
+ self.assertEquals(normalizeName('errasdebug', min_=1), 'errasdebug')
+
+ def testExpandShort(self):
+ self.assertEquals(normalizeName('mozilla-central', min_=8, max_=8), 'm-cen-00')
+
+ def testCantShorten(self):
+ self.assertRaises(ValueError, normalizeName, 'abcdefgh', max_=2)
+
+ def testPrefixDoesntViolateMax(self):
+ got = normalizeName('comm-beta', product='thunderbird', min_=9, max_=9)
+ self.assertEquals(got, 'tb-c-beta')
+
+ def testPrefixDelimeterOnly(self):
+ got = normalizeName('mozilla-esr17', min_=8, max_=8)
+ self.assertEquals(got, 'm-esr17-')

0 comments on commit 77ff532

Please sign in to comment.