Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge default to production

--HG--
branch : production-0.8
  • Loading branch information...
commit 8ca8b09052e95ef5b12cdbb373a7bdc3afde71d7 2 parents 93ad647 + c56b7e6
@Callek Callek authored
Showing with 152 additions and 308 deletions.
  1. +14 −35 misc.py
  2. +1 −1  process/factory.py
  3. +108 −210 test/test_try_parser.py
  4. +29 −62 try_parser.py
View
49 misc.py
@@ -673,8 +673,7 @@ def generateBranchObjects(config, name, secrets=None):
weeklyBuilders = []
coverageBuilders = []
# prettyNames is a mapping to pass to the try_parser for validation
- PRETTY_NAME = '%(basename)s %(trystatus)sbuild'
- NAME = '%(basename)s build'
+ PRETTY_NAME = '%s build'
prettyNames = {}
unittestPrettyNames = {}
unittestSuites = []
@@ -703,6 +702,7 @@ def generateBranchObjects(config, name, secrets=None):
for platform in enabled_platforms:
pf = config['platforms'][platform]
base_name = pf['base_name']
+ pretty_name = PRETTY_NAME % base_name
# short-circuit the extra logic below for debug, l10n, pgo and nightly
# builds these aren't required (yet) for mozharness builds
@@ -718,15 +718,9 @@ def generateBranchObjects(config, name, secrets=None):
nightlyBuilders.append(buildername)
continue
- values = { 'basename': base_name,
- 'trystatus': '' if pf.get('try-by-default', True) else 'try-nondefault ',
- }
- pretty_name = PRETTY_NAME % values
- name = NAME % values
-
if platform.endswith("-debug"):
- builders.append(name)
- buildersByProduct.setdefault(pf['stage_product'], []).append(name)
+ builders.append(pretty_name)
+ buildersByProduct.setdefault(pf['stage_product'], []).append(pretty_name)
prettyNames[platform] = pretty_name
# Debug unittests
if pf.get('enable_unittests'):
@@ -744,8 +738,8 @@ def generateBranchObjects(config, name, secrets=None):
if not pf.has_key('enable_nightly'):
continue
elif pf.get('enable_dep', True):
- builders.append(name)
- buildersByProduct.setdefault(pf['stage_product'], []).append(name)
+ builders.append(pretty_name)
+ buildersByProduct.setdefault(pf['stage_product'], []).append(pretty_name)
prettyNames[platform] = pretty_name
# Fill the l10n dep dict
@@ -1912,22 +1906,13 @@ def generateTalosBranchObjects(branch, branch_config, PLATFORMS, SUITES,
talos_builders = {}
talos_pgo_builders = {}
- try_default = True
- if not branch_config['platforms'][platform].get('try-by-default', True):
- try_default = False
- elif not platform_config.get('try-by-default', True):
- try_default = False
-
for slave_platform in slave_platforms:
platform_name = platform_config[slave_platform]['name']
# this is to handle how a platform has more than one slave platform
- slave_platform_try_default = try_default
- if not platform_config[slave_platform].get('try-by-default', True):
- slave_platform_try_default = False
- platformPrettyName = platform_name
- if not slave_platform_try_default:
- platformPrettyName += ' try-nondefault'
- prettyNames.setdefault(platform, []).append(platformPrettyName)
+ if prettyNames.has_key(platform):
+ prettyNames[platform].append(platform_name)
+ else:
+ prettyNames[platform] = [platform_name]
for suite, talosConfig in SUITES.items():
tests, merge, extra, platforms = branch_config['%s_tests' % suite]
if tests == 0 or slave_platform not in platforms:
@@ -2458,8 +2443,7 @@ def generateNanojitObjects(config, SLAVES):
def generateSpiderMonkeyObjects(project, config, SLAVES):
builders = []
- branch = config['branch']
- bconfig = config['branchconfig']
+ branch = os.path.basename(config['repo_path'])
PRETTY_NAME = '%s %s-%s build'
prettyNames = {}
@@ -2484,9 +2468,9 @@ def generateSpiderMonkeyObjects(project, config, SLAVES):
factory_kwargs['env'] = env
extra_args = [ '-r', WithProperties("%(revision)s") ]
- for url in bconfig['base_mirror_urls']:
+ for url in config['branchconfig']['base_mirror_urls']:
extra_args += [ '-m', "%s/%s" % (url, config['repo_path']) ]
- for url in bconfig['base_bundle_urls']:
+ for url in config['branchconfig']['base_bundle_urls']:
extra_args += [ '-b', "%s/%s.hg" % (url, config['repo_path']) ]
extra_args += [variant]
@@ -2505,12 +2489,9 @@ def generateSpiderMonkeyObjects(project, config, SLAVES):
base_name = pf['base_name'] % config
prettyName = PRETTY_NAME % (base_name, project, variant)
- name = prettyName
- if not config.get('try-by-default', True):
- prettyName += ' try-nondefault'
prettyNames[platform] = prettyName
- builder = {'name': name,
+ builder = {'name': prettyName,
'builddir': '%s_%s_spidermonkey-%s' % (branch, platform, variant),
'slavebuilddir': reallyShort('%s_%s_spidermonkey-%s' % (branch, platform, variant)),
'slavenames': pf['slaves'],
@@ -2521,8 +2502,6 @@ def generateSpiderMonkeyObjects(project, config, SLAVES):
'properties': {'branch': branch, 'platform': platform, 'product': 'spidermonkey'},
}
builders.append(builder)
- if not bconfig.get('enable_merging', True):
- nomergeBuilders.append(name)
def isImportant(change):
if not shouldBuild(change):
View
2  process/factory.py
@@ -4866,7 +4866,7 @@ def addRunTestSteps(self):
symbols_path=symbols_path,
maxTime=120*60, # Two Hours
))
- elif suite in ('reftest', 'reftestsmall' 'reftest-ipc', 'reftest-d2d', 'crashtest', \
+ elif suite in ('reftest', 'reftestsmall', 'reftest-ipc', 'reftest-d2d', 'crashtest', \
'crashtest-ipc', 'direct3D', 'opengl', 'opengl-no-accel', \
'reftest-no-d2d-d3d'):
if suite in ('direct3D', 'opengl'):
View
318 test/test_try_parser.py
@@ -1,45 +1,32 @@
from buildbotcustom.try_parser import TryParser, processMessage
import unittest
-def base_platform(platform):
- return platform.replace(' try-nondefault', '')
-
###### TEST CASES #####
BUILDER_PRETTY_NAMES = {'macosx64':'OS X 10.6.2 try build',
- 'macosx64-debug':'OS X 10.6.2 try leak test build',
- 'macosx-debug':'OS X 10.5.2 try leak test build',
'win32':'WINNT 5.2 try build',
'win32-debug':'WINNT 5.2 try leak test build',
- 'win64':'WINNT 6.1 try try-nondefault build',
'linux64':'Linux x86-64 try build',
- 'linux64-debug':'Linux x86-64 try leak test build',
'linux':'Linux try build',
+ 'macosx64-debug':'OS X 10.6.2 try leak test build',
+ 'linux64-debug':'Linux x86-64 try leak test build',
'linux-debug':'Linux try leak test build',
+ 'macosx-debug':'OS X 10.5.2 try leak test build',
'android-r7':'Android R7 try build',
- 'maemo5-gtk':'Maemo 5 GTK try build',
- }
+ 'maemo5-gtk':'Maemo 5 GTK try build'}
# TODO -- need to check on how to separate out the two win32 prettynames
-TESTER_PRETTY_NAMES = {'macosx': ['Rev3 MacOSX Leopard 10.5.8'],
- 'macosx64': ['Rev3 MacOSX Snow Leopard 10.6.2',
- 'Rev3 MacOSX Leopard 9.0 try-nondefault'],
- 'win32': ['Rev3 WINNT 5.1',
- 'Rev3 WINNT 6.1'],
- 'linux64': ['Rev3 Fedora 12x64'],
- 'linux': ['Rev3 Fedora 12'],
- }
-TESTER_PRETTY_TB_NAMES = {'linux': ['TB Rev3 Fedora 12']}
-UNITTEST_PRETTY_NAMES = {'win32-debug': 'WINNT 5.2 try debug test'}
+TESTER_PRETTY_NAMES = {'macosx':['Rev3 MacOSX Leopard 10.5.8'],
+ 'macosx64':['Rev3 MacOSX Snow Leopard 10.6.2', 'Rev3 MacOSX Leopard 10.5.8'],
+ 'win32':['Rev3 WINNT 5.1', 'Rev3 WINNT 6.1'],
+ 'linux-64':['Rev3 Fedora 12x64'],
+ 'linux':['Rev3 Fedora 12']}
+TESTER_PRETTY_TB_NAMES = {'linux':['TB Rev3 Fedora 12']}
+UNITTEST_PRETTY_NAMES = {'win32-debug':'WINNT 5.2 try debug test'}
BUILDER_PRETTY_B2G_NAMES = { 'ics_armv7a_gecko': 'b2g_try_ics_armv7a_gecko build',
'ics_armv7a_gecko-debug': 'b2g_try_ics_armv7a_gecko-debug build' }
TALOS_SUITES = ['tp4', 'chrome']
-UNITTEST_SUITES = ['reftest',
- 'crashtest',
- 'mochitest-1',
- 'mochitest-3',
- 'mochitest-browser-chrome',
- 'mochitest-other']
+UNITTEST_SUITES = ['reftest', 'crashtest', 'mochitest-1', 'mochitest-3', 'mochitest-browser-chrome', 'mochitest-other']
UNITTEST_SUITES_TB = ['xpcshell', 'mozmill']
MOBILE_UNITTEST_SUITES = ['reftest-1', 'reftest-3'] + UNITTEST_SUITES[1:]
@@ -52,7 +39,17 @@ def base_platform(platform):
VALID_REFTEST_NAMES = ['WINNT 5.2 try debug test reftest',
'WINNT 5.2 try debug test reftest-1',
'WINNT 5.2 try debug test reftest-3']
-VALID_BUILDER_NAMES = [ base_platform(b) for b in BUILDER_PRETTY_NAMES.values() ]
+VALID_BUILDER_NAMES = ['OS X 10.6.2 try build',
+ 'WINNT 5.2 try build',
+ 'Linux x86-64 try build',
+ 'Linux try build',
+ 'OS X 10.5.2 try leak test build',
+ 'OS X 10.6.2 try leak test build',
+ 'WINNT 5.2 try leak test build',
+ 'Linux x86-64 try leak test build',
+ 'Linux try leak test build',
+ 'Android R7 try build',
+ 'Maemo 5 GTK try build']
VALID_TESTER_NAMES = ['Rev3 Fedora 12 try opt test mochitest-1',
'Rev3 Fedora 12 try opt test mochitest-browser-chrome',
'Rev3 Fedora 12 try opt test mochitest-other',
@@ -67,9 +64,7 @@ def base_platform(platform):
'Rev3 WINNT 6.1 try debug test mochitest-browser-chrome',
'Rev3 WINNT 6.1 try debug test mochitest-other',
'Rev3 WINNT 6.1 try debug test mochitest-3',
- 'Rev3 MacOSX Snow Leopard 10.6.2 try debug test crashtest',
- 'Rev3 MacOSX Leopard 9.0 try debug test crashtest',
- 'Rev3 MacOSX Leopard 9.0 try talos tp4',
+ 'Rev3 MacOSX Leopard 10.5.8 try talos tp4',
'Rev3 WINNT 5.1 try talos chrome',
'Rev3 WINNT 6.1 try talos tp4',
'Rev3 WINNT 5.1 try talos tp4',
@@ -79,92 +74,57 @@ def base_platform(platform):
VALID_BUILDER_B2G_NAMES = ['b2g_try_ics_armv7a_gecko-debug build',
'b2g_try_ics_armv7a_gecko build']
-def dictslice(d, keys, default=None):
- if hasattr(keys, '__call__'):
- return dict([ (k, v) for k, v in d.items() if keys(k)])
- else:
- return dict([ (k,d.get(k, default)) for k in keys])
-
class TestTryParser(unittest.TestCase):
- def setUp(self):
- builders = self.filterTesters(['win32'])
- builders = [ t for t in builders if 'crashtest' in t or 'reftest' in t ]
- self.baselineBuilders = builders
-
- def removeNondefaults(self, builders, pretties):
- platform_names = pretties.values()
- if isinstance(platform_names[0], list):
- platform_names = reduce(lambda a, b: a+b, platform_names)
- nondefaults = [ base_platform(n)
- for n in platform_names
- if 'try-nondefault' in n ]
- nondefault_builders = set([ b for b in builders for nd in nondefaults if nd in b ])
- return set(builders) - nondefault_builders
-
- def filterBuilders(self, platforms,
- pretties = BUILDER_PRETTY_NAMES,
- valid = VALID_BUILDER_NAMES):
- chosen = set()
- assert isinstance(platforms, list)
- for platform in platforms:
- arch = pretties[platform]
- assert not isinstance(arch, list)
- chosen.update([ builder for builder in valid if arch in builder ])
- return list(chosen)
-
- def filterTesters(self, platforms,
- pretties = TESTER_PRETTY_NAMES,
- valid = VALID_TESTER_NAMES):
- chosen = set()
- assert isinstance(platforms, list)
- for platform in platforms:
- slave_platforms = pretties.get(platform, [])
- assert isinstance(slave_platforms, list)
- for slave_platform in slave_platforms:
- base = base_platform(slave_platform)
- chosen.update([ builder for builder in valid if base in builder ])
- return list(chosen)
-
def test_BlankMessage(self):
# Should get default set with blank input
tm = ""
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
- builders = self.removeNondefaults(VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
- self.assertEqual(sorted(self.customBuilders),sorted(builders))
+ self.assertEqual(sorted(self.customBuilders),sorted(VALID_BUILDER_NAMES))
def test_JunkMessageBuilders(self):
# Should get default set with junk input
tm = "try: junk"
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
- builders = self.removeNondefaults(VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
- self.assertEqual(sorted(self.customBuilders),sorted(builders))
+ self.assertEqual(sorted(self.customBuilders),sorted(VALID_BUILDER_NAMES))
def test_JunkMessageTesters(self):
# Should get default set with junk input to the test masters
tm = "try: junk"
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, UNITTEST_SUITES)
- builders = [ b for b in VALID_TESTER_NAMES if 'talos' not in b ]
- builders = self.removeNondefaults(builders, TESTER_PRETTY_NAMES)
+ builders = ['Rev3 Fedora 12 try opt test mochitest-1',
+ 'Rev3 Fedora 12 try opt test mochitest-browser-chrome',
+ 'Rev3 Fedora 12 try opt test mochitest-other',
+ 'Rev3 Fedora 12 try opt test crashtest',
+ 'Rev3 Fedora 12 try debug test mochitest-1',
+ 'Rev3 Fedora 12 try debug test mochitest-browser-chrome',
+ 'Rev3 Fedora 12 try debug test mochitest-other',
+ 'Rev3 WINNT 5.1 try opt test reftest',
+ 'Rev3 WINNT 5.1 try opt test crashtest',
+ 'Rev3 WINNT 6.1 try opt test crashtest',
+ 'Rev3 WINNT 6.1 try debug test crashtest',
+ 'Rev3 WINNT 6.1 try debug test mochitest-browser-chrome',
+ 'Rev3 WINNT 6.1 try debug test mochitest-other',
+ 'Rev3 WINNT 6.1 try debug test mochitest-3']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_JunkBuildMessage(self):
# Should get default set with junk input for --build
tm = "try: -b k -p linux"
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
- builders = dictslice(BUILDER_PRETTY_NAMES, [ 'linux', 'linux-debug' ]).values()
+ builders = ['Linux try build','Linux try leak test build']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_DebugOnlyBuild(self):
tm = "try: -b d -p linux64,linux"
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
- builders = [ BUILDER_PRETTY_NAMES[p] for p in ['linux64-debug', 'linux-debug'] ]
+ builders = ['Linux x86-64 try leak test build', 'Linux try leak test build']
self.assertEquals(sorted(self.customBuilders), sorted(builders))
def test_OptOnlyBuild(self):
tm = "try: -b o -p macosx64,linux"
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
- builders = [ BUILDER_PRETTY_NAMES[p] for p in ['macosx64', 'linux'] ]
+ builders = ['OS X 10.6.2 try build', 'Linux try build']
self.assertEquals(sorted(self.customBuilders), sorted(builders))
def test_BothBuildTypes(self):
@@ -172,7 +132,7 @@ def test_BothBuildTypes(self):
tm = ['try: -b od -p win32','try: -b do -p win32']
for m in tm:
self.customBuilders = TryParser(m, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
- builders = [ BUILDER_PRETTY_NAMES[p] for p in ['win32', 'win32-debug'] ]
+ builders = ['WINNT 5.2 try build', 'WINNT 5.2 try leak test build']
self.assertEquals(sorted(self.customBuilders), sorted(builders))
def test_SpecificPlatform(self):
@@ -180,172 +140,121 @@ def test_SpecificPlatform(self):
# should specify macosx and macosx64 to get opt and debug
tm = 'try: -b od -p macosx64,macosx'
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
- builders = [ BUILDER_PRETTY_NAMES[p] for p in ['macosx64', 'macosx64-debug', 'macosx-debug' ] ]
+ builders = ['OS X 10.6.2 try build', 'OS X 10.6.2 try leak test build', 'OS X 10.5.2 try leak test build']
self.assertEquals(sorted(self.customBuilders), sorted(builders))
def test_B2GPlatform(self):
tm = 'try: -b od -p ics_armv7a_gecko'
self.customBuilders = TryParser(tm, VALID_BUILDER_B2G_NAMES, BUILDER_PRETTY_B2G_NAMES)
- builders = self.filterBuilders(['ics_armv7a_gecko', 'ics_armv7a_gecko-debug'],
- pretties = BUILDER_PRETTY_B2G_NAMES,
- valid = VALID_BUILDER_B2G_NAMES)
+ builders = ['b2g_try_ics_armv7a_gecko-debug build', 'b2g_try_ics_armv7a_gecko build' ]
self.assertEquals(sorted(self.customBuilders), sorted(builders))
tm = 'try: -b o -p ics_armv7a_gecko'
self.customBuilders = TryParser(tm, VALID_BUILDER_B2G_NAMES, BUILDER_PRETTY_B2G_NAMES)
builders = ['b2g_try_ics_armv7a_gecko build' ]
- builders = self.filterBuilders(['ics_armv7a_gecko'],
- pretties = BUILDER_PRETTY_B2G_NAMES,
- valid = VALID_BUILDER_B2G_NAMES)
self.assertEquals(sorted(self.customBuilders), sorted(builders))
def test_AllPlatformsBoth(self):
tm = 'try: -b od -p all'
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
- builders = [ b for b in BUILDER_PRETTY_NAMES.values() if 'nondefault' not in b ]
- self.assertEqual(sorted(self.customBuilders),sorted(builders))
-
- def test_FullPlatformsBoth(self):
- tm = 'try: -b od -p full'
- self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
- builders = VALID_BUILDER_NAMES
- self.assertEqual(sorted(self.customBuilders),sorted(builders))
-
- def test_FullPlatformsOpt(self):
- tm = 'try: -b o -p full'
- self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
- builders = dictslice(BUILDER_PRETTY_NAMES, lambda p: 'debug' not in p).values()
- builders = [ base_platform(b) for b in builders ]
- self.assertEqual(sorted(self.customBuilders),sorted(builders))
-
- def test_FullPlatformsDebug(self):
- tm = 'try: -b d -p full'
- self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
- builders = dictslice(BUILDER_PRETTY_NAMES, lambda p: 'debug' in p).values()
- self.assertEqual(sorted(self.customBuilders),sorted(builders))
-
- def test_AllPlatformsBoth(self):
- tm = 'try: -b od -p all'
- self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
- builders = [ b for b in BUILDER_PRETTY_NAMES.values() if 'nondefault' not in b ]
+ builders = ['OS X 10.6.2 try build', 'WINNT 5.2 try build', 'Linux x86-64 try build', 'Linux try build', 'OS X 10.5.2 try leak test build', 'OS X 10.6.2 try leak test build', 'WINNT 5.2 try leak test build', 'Linux x86-64 try leak test build', 'Linux try leak test build', 'Android R7 try build', 'Maemo 5 GTK try build']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_AllPlatformsOpt(self):
tm = 'try: -b o -p all'
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
- builders = dictslice(BUILDER_PRETTY_NAMES, lambda p: 'debug' not in p).values()
- builders = [ b for b in builders if 'nondefault' not in b ]
+ builders = ['OS X 10.6.2 try build', 'WINNT 5.2 try build', 'Linux x86-64 try build', 'Linux try build', 'Android R7 try build', 'Maemo 5 GTK try build']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_AllPlatformsDebug(self):
tm = 'try: -b d -p all'
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
- builders = dictslice(BUILDER_PRETTY_NAMES, lambda p: 'debug' in p).values()
- builders = [ b for b in builders if 'nondefault' not in b ]
- self.assertEqual(sorted(self.customBuilders),sorted(builders))
-
- def test_NoNondefaultTests(self):
- tm = 'try: -b d -p macosx64 -u all'
- self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, UNITTEST_SUITES)
- builders = self.filterTesters(['macosx64'])
- builders = self.removeNondefaults(builders, TESTER_PRETTY_NAMES)
- self.assertEqual(sorted(self.customBuilders),sorted(builders))
-
- def test_NondefaultsTest(self):
- tm = 'try: -b d -p macosx64 -u all[]'
- self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, UNITTEST_SUITES)
- builders = self.filterTesters(['macosx64'])
- builders = [ b for b in builders if 'talos' not in b ]
+ builders = ['OS X 10.5.2 try leak test build', 'OS X 10.6.2 try leak test build', 'WINNT 5.2 try leak test build', 'Linux x86-64 try leak test build', 'Linux try leak test build']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_AllOnTestMaster(self):
tm = 'try: -a'
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, UNITTEST_SUITES)
- builders = [ n for n in VALID_TESTER_NAMES if 'talos' not in n ]
- builders = self.removeNondefaults(builders, TESTER_PRETTY_NAMES)
+ builders = ['Rev3 Fedora 12 try opt test mochitest-1',
+ 'Rev3 Fedora 12 try opt test mochitest-other',
+ 'Rev3 Fedora 12 try opt test mochitest-browser-chrome',
+ 'Rev3 Fedora 12 try opt test crashtest',
+ 'Rev3 Fedora 12 try debug test mochitest-1',
+ 'Rev3 Fedora 12 try debug test mochitest-other',
+ 'Rev3 Fedora 12 try debug test mochitest-browser-chrome',
+ 'Rev3 WINNT 5.1 try opt test reftest',
+ 'Rev3 WINNT 5.1 try opt test crashtest',
+ 'Rev3 WINNT 6.1 try opt test crashtest',
+ 'Rev3 WINNT 6.1 try debug test crashtest',
+ 'Rev3 WINNT 6.1 try debug test mochitest-other',
+ 'Rev3 WINNT 6.1 try debug test mochitest-browser-chrome',
+ 'Rev3 WINNT 6.1 try debug test mochitest-3']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_AllOnTestMasterCC(self):
tm = 'try: -a'
self.customBuilders = TryParser(tm, VALID_TESTER_TB_NAMES, TESTER_PRETTY_TB_NAMES, None, UNITTEST_SUITES_TB, None, "try-comm-central")
- builders = VALID_TESTER_TB_NAMES
- builders = self.removeNondefaults(builders, TESTER_PRETTY_TB_NAMES)
+ builders = ['TB Rev3 Fedora 12 try-comm-central opt test mozmill',
+ 'TB Rev3 Fedora 12 try-comm-central opt test xpcshell']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_MochitestAliasesOnBuilderMaster(self):
tm = 'try: -b od -p win32 -u mochitests'
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES+VALID_UPN, BUILDER_PRETTY_NAMES, UNITTEST_PRETTY_NAMES, UNITTEST_SUITES)
- builders = [ BUILDER_PRETTY_NAMES[p] for p in ['win32', 'win32-debug'] ]
- builders += [ t for t in VALID_UPN if 'mochitest' in t ]
+ builders = ['WINNT 5.2 try build', 'WINNT 5.2 try leak test build', 'WINNT 5.2 try debug test mochitest-browser-chrome', 'WINNT 5.2 try debug test mochitest-other', 'WINNT 5.2 try debug test mochitest-3', 'WINNT 5.2 try debug test mochitest-1',]
self.assertEqual(sorted(self.customBuilders),sorted(builders))
tm = 'try: -b od -p win32 -u mochitest-bc'
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES+VALID_UPN, BUILDER_PRETTY_NAMES, UNITTEST_PRETTY_NAMES, UNITTEST_SUITES)
- builders = [ BUILDER_PRETTY_NAMES[p] for p in ['win32', 'win32-debug'] ]
- builders += [ t for t in VALID_UPN if 'mochitest-browser-chrome' in t ]
+ builders = ['WINNT 5.2 try build', 'WINNT 5.2 try leak test build', 'WINNT 5.2 try debug test mochitest-browser-chrome']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
tm = 'try: -b od -p win32 -u mochitest-o'
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES+VALID_UPN, BUILDER_PRETTY_NAMES, UNITTEST_PRETTY_NAMES, UNITTEST_SUITES)
- builders = [ BUILDER_PRETTY_NAMES[p] for p in ['win32', 'win32-debug'] ]
- builders += [ t for t in VALID_UPN if 'mochitest-other' in t ]
+ builders = ['WINNT 5.2 try build', 'WINNT 5.2 try leak test build', 'WINNT 5.2 try debug test mochitest-other']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_MochitestAliasesOnTestMaster(self):
tm = 'try: -b od -p all -u mochitests'
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, UNITTEST_SUITES)
- builders = [ t for t in VALID_TESTER_NAMES if 'mochitest' in t ]
+ builders = ['Rev3 Fedora 12 try opt test mochitest-1', 'Rev3 Fedora 12 try opt test mochitest-browser-chrome', 'Rev3 Fedora 12 try opt test mochitest-other', 'Rev3 Fedora 12 try debug test mochitest-1', 'Rev3 Fedora 12 try debug test mochitest-browser-chrome', 'Rev3 Fedora 12 try debug test mochitest-other', 'Rev3 WINNT 6.1 try debug test mochitest-browser-chrome', 'Rev3 WINNT 6.1 try debug test mochitest-other', 'Rev3 WINNT 6.1 try debug test mochitest-3']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
tm = 'try: -b od -p win32 -u mochitest-bc'
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, UNITTEST_SUITES)
- builders = [ t for t in self.filterTesters(['win32'])
- if 'mochitest-browser-chrome' in t ]
+ builders = ['Rev3 WINNT 6.1 try debug test mochitest-browser-chrome']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
tm = 'try: -b od -p win32 -u mochitest-o'
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, UNITTEST_SUITES)
- builders = [ t for t in self.filterTesters(['win32'])
- if 'mochitest-other' in t ]
+ builders = ['Rev3 WINNT 6.1 try debug test mochitest-other']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_MochitestAliasesOnTestMasterDebugOnly(self):
tm = 'try: -b d -p all -u mochitests'
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, UNITTEST_SUITES)
- builders = [ t for t in VALID_TESTER_NAMES if 'mochitest' in t and 'debug' in t ]
+ builders = ['Rev3 Fedora 12 try debug test mochitest-1', 'Rev3 Fedora 12 try debug test mochitest-browser-chrome', 'Rev3 Fedora 12 try debug test mochitest-other', 'Rev3 WINNT 6.1 try debug test mochitest-browser-chrome', 'Rev3 WINNT 6.1 try debug test mochitest-other', 'Rev3 WINNT 6.1 try debug test mochitest-3']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_BuildMasterDebugWin32Tests(self):
tm = 'try: -b d -p win32 -u mochitests'
# test in the getBuilders (for local builder_master unittests)
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES+VALID_UPN, {}, UNITTEST_PRETTY_NAMES, UNITTEST_SUITES)
- builders = self.filterBuilders(['win32-debug'],
- valid = VALID_BUILDER_NAMES+VALID_UPN,
- pretties = UNITTEST_PRETTY_NAMES)
- builders = [ t for t in builders if 'mochitest' in t and 'debug' in t ]
+ builders = ['WINNT 5.2 try debug test mochitest-browser-chrome', 'WINNT 5.2 try debug test mochitest-other', 'WINNT 5.2 try debug test mochitest-3', 'WINNT 5.2 try debug test mochitest-1']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_ReftestAliases(self):
tm = 'try: -b d -p win32 -u reftests'
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES+VALID_UPN, {}, UNITTEST_PRETTY_NAMES, UNITTEST_SUITES)
- builders = self.filterBuilders(['win32-debug'],
- valid = VALID_BUILDER_NAMES+VALID_UPN,
- pretties = UNITTEST_PRETTY_NAMES)
- builders = [ t for t in builders if 'reftest' in t ]
+ builders = ['WINNT 5.2 try debug test reftest']
self.assertEquals(sorted(self.customBuilders),sorted(builders))
tm = 'try: -b d -p win32 -u reftest'
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES+VALID_UPN, {}, UNITTEST_PRETTY_NAMES, UNITTEST_SUITES)
+ builders = ['WINNT 5.2 try debug test reftest']
self.assertEquals(sorted(self.customBuilders),sorted(builders))
def test_ReftestMobileAliases(self):
tm = 'try: -b d -p win32 -u reftests'
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES+VALID_REFTEST_NAMES, {}, UNITTEST_PRETTY_NAMES, MOBILE_UNITTEST_SUITES)
- builders = self.filterBuilders(['win32-debug'],
- valid = VALID_BUILDER_NAMES+VALID_REFTEST_NAMES,
- pretties = UNITTEST_PRETTY_NAMES)
- # MOBILE_UNITTEST_SUITES only has 'reftest-1' and 'reftest-3', not
- # 'reftest', and the builder names are constructed through string
- # concatenation, so there's no straightforward way to exclude the plain
- # 'reftest' element of VALID_REFTEST_NAMES. I'll sidestep the issue for
- # now by only accepting the substring 'reftest-'.
- builders = [ t for t in builders if 'reftest-' in t ]
+ builders = ['WINNT 5.2 try debug test reftest-1', 'WINNT 5.2 try debug test reftest-3']
self.assertEquals(sorted(self.customBuilders),sorted(builders))
tm = 'try: -b d -p win32 -u reftest'
+ builders = ['WINNT 5.2 try debug test reftest-1', 'WINNT 5.2 try debug test reftest-3']
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES+VALID_REFTEST_NAMES, {}, UNITTEST_PRETTY_NAMES, MOBILE_UNITTEST_SUITES)
self.assertEquals(sorted(self.customBuilders),sorted(builders))
@@ -353,24 +262,21 @@ def test_SelectTests(self):
tm = 'try: -b od -p win32 -u crashtest,mochitest-other'
# test in the getBuilders (for local builder_master unittests)
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES+VALID_UPN, BUILDER_PRETTY_NAMES, UNITTEST_PRETTY_NAMES, UNITTEST_SUITES)
- builders = [ BUILDER_PRETTY_NAMES['win32'], BUILDER_PRETTY_NAMES['win32-debug'] ]
- testers = self.filterBuilders(['win32-debug'],
- valid = VALID_BUILDER_NAMES+VALID_UPN,
- pretties = UNITTEST_PRETTY_NAMES)
- builders += [ t for t in testers if 'crashtest' in t or 'mochitest-other' in t ]
-
+ builders = ['WINNT 5.2 try build', 'WINNT 5.2 try leak test build', 'WINNT 5.2 try debug test crashtest', 'WINNT 5.2 try debug test mochitest-other']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
# test in the getTestBuilders (for local builder_master unittests)
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, UNITTEST_SUITES)
- builders = self.filterTesters(['win32'])
- builders = [ t for t in builders if 'crashtest' in t or 'mochitest-other' in t ]
+ builders = ['Rev3 WINNT 5.1 try opt test crashtest',
+ 'Rev3 WINNT 6.1 try opt test crashtest',
+ 'Rev3 WINNT 6.1 try debug test crashtest',
+ 'Rev3 WINNT 6.1 try debug test mochitest-other']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_NoTests(self):
tm = 'try: -b od -p linux,win32 -u none'
# test in getBuilders
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES, UNITTEST_PRETTY_NAMES, UNITTEST_SUITES)
- builders = self.filterBuilders(['linux', 'linux-debug', 'win32', 'win32-debug'])
+ builders = ['Linux try build', 'Linux try leak test build', 'WINNT 5.2 try build', 'WINNT 5.2 try leak test build']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
# test in getTestBuilders
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, TESTER_PRETTY_NAMES, None, UNITTEST_SUITES)
@@ -381,21 +287,18 @@ def test_AllTalos(self):
# should get all unittests too since that's the default set
tm = 'try: -b od -t all'
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, UNITTEST_SUITES, TALOS_SUITES)
- builders = self.removeNondefaults(VALID_TESTER_NAMES, TESTER_PRETTY_NAMES)
- self.assertEqual(sorted(self.customBuilders),sorted(builders))
+ self.assertEqual(sorted(self.customBuilders),sorted(VALID_TESTER_NAMES))
def test_SelecTalos(self):
tm = 'try: -b od -p win32 -t tp4'
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, None, TALOS_SUITES)
- builders = self.filterTesters(['win32'])
- builders = [ t for t in builders if 'tp4' in t ]
+ builders = ['Rev3 WINNT 6.1 try talos tp4', 'Rev3 WINNT 5.1 try talos tp4']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_SelecTalosWithNoTalosPlatforms(self):
tm = 'try: -b od -p win32,android-r7 -t tp4'
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, None, TALOS_SUITES)
- builders = self.filterTesters(['win32', 'android-r7'])
- builders = [ t for t in builders if 'tp4' in t ]
+ builders = ['Rev3 WINNT 6.1 try talos tp4', 'Rev3 WINNT 5.1 try talos tp4']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_NoTalos(self):
@@ -407,34 +310,32 @@ def test_NoTalos(self):
def test_DebugWin32OnTestMaster(self):
tm = 'try: -b do -p win32 -u crashtest'
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES,None, UNITTEST_SUITES)
- builders = self.filterTesters(['win32'])
- builders = [ t for t in builders if 'crashtest' in t ]
+ builders = ['Rev3 WINNT 6.1 try debug test crashtest',
+ 'Rev3 WINNT 5.1 try opt test crashtest',
+ 'Rev3 WINNT 6.1 try opt test crashtest']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_RestrictionBaseline(self):
# This isn't really a test of anything. It's mostly to make reading the
# following tests easier by giving the full set of possible builds
# without any filtering.
- tm = 'try: -b do -p win32 -u crashtest,reftest'
+ tm = 'try: -b do -p win32 -u crashtest'
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES,None, UNITTEST_SUITES)
- builders = self.filterTesters(['win32'])
- builders = [ t for t in builders if 'crashtest' in t or 'reftest' in t ]
- self.assertEqual(sorted(self.baselineBuilders),sorted(builders))
+ builders = ['Rev3 WINNT 5.1 try opt test crashtest',
+ 'Rev3 WINNT 6.1 try opt test crashtest',
+ 'Rev3 WINNT 6.1 try debug test crashtest']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_Include5_1(self):
tm = 'try: -b do -p win32 -u crashtest[5.1]'
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES,None, UNITTEST_SUITES)
- builders = [ b for b in self.baselineBuilders if 'crashtest' in b and '5.1' in b ]
+ builders = ['Rev3 WINNT 5.1 try opt test crashtest']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_IncludeExclude(self):
tm = 'try: -b do -p win32 -u crashtest[-5.1,debug]'
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES,None, UNITTEST_SUITES)
- builders = [ b for b in self.baselineBuilders
- if 'crashtest' in b
- and '5.1' not in b
- and 'debug' in b ]
+ builders = ['Rev3 WINNT 6.1 try debug test crashtest']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_IncludeExcludeEmpty(self):
@@ -446,51 +347,48 @@ def test_IncludeExcludeEmpty(self):
def test_IncludeDummyExclude(self):
tm = 'try: -b do -p win32 -u crashtest[5.1,-notfound]'
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES,None, UNITTEST_SUITES)
- builders = [ b for b in self.baselineBuilders
- if 'crashtest' in b
- and '5.1' in b
- and 'notfound' not in b ]
+ builders = ['Rev3 WINNT 5.1 try opt test crashtest']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_Exclude5_1(self):
tm = 'try: -b do -p win32 -u crashtest[-5.1]'
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES,None, UNITTEST_SUITES)
- builders = [ b for b in self.baselineBuilders
- if 'crashtest' in b
- and '5.1' not in b ]
+ builders = ['Rev3 WINNT 6.1 try opt test crashtest',
+ 'Rev3 WINNT 6.1 try debug test crashtest']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_MultipleInclusions(self):
tm = 'try: -b do -p win32 -u all[5.1,crash]'
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES,None, UNITTEST_SUITES)
- builders = [ b for b in self.baselineBuilders if '5.1' in b or 'crash' in b ]
+ builders = ['Rev3 WINNT 5.1 try opt test reftest',
+ 'Rev3 WINNT 5.1 try opt test crashtest',
+ 'Rev3 WINNT 6.1 try opt test crashtest',
+ 'Rev3 WINNT 6.1 try debug test crashtest']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_HiddenCharactersAndOldSyntax(self):
tm = 'attributes\ntry: -b o -p linux64 -m none -u reftest -t none'
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES, None, UNITTEST_SUITES)
- builders = [ BUILDER_PRETTY_NAMES['linux64'] ]
+ builders = ['Linux x86-64 try build']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def test_NoBuildTypeSelected(self):
tm = 'try: -m none -u crashtest -p win32'
# should get both build types for the selected platform
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES, None, UNITTEST_SUITES)
- builders = [ BUILDER_PRETTY_NAMES['win32'], BUILDER_PRETTY_NAMES['win32-debug'] ]
+ builders = ['WINNT 5.2 try build', 'WINNT 5.2 try leak test build']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
# should get debug win32 in the builder_master test builders
self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES+VALID_UPN, {}, UNITTEST_PRETTY_NAMES, UNITTEST_SUITES)
- builders = self.filterBuilders(['win32-debug'],
- pretties = UNITTEST_PRETTY_NAMES,
- valid = VALID_BUILDER_NAMES+VALID_UPN)
- builders = [ t for t in builders if 'crashtest' in t ]
+ builders = ['WINNT 5.2 try debug test crashtest']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
# should get both build types in test_builders
self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, UNITTEST_SUITES)
- builders = self.filterTesters(['win32', 'win32-debug'])
- builders = [ t for t in builders if 'crashtest' in t ]
+ builders = ['Rev3 WINNT 6.1 try opt test crashtest',
+ 'Rev3 WINNT 5.1 try opt test crashtest',
+ 'Rev3 WINNT 6.1 try debug test crashtest']
self.assertEqual(sorted(self.customBuilders),sorted(builders))
def _testNewLineProcessMessage(self, message, value=None):
View
91 try_parser.py
@@ -44,14 +44,9 @@ def expandPlatforms(user_platforms, buildTypes):
if 'opt' in buildTypes:
platforms.update(user_platforms)
if 'debug' in buildTypes:
- platforms.update([ p + '-debug' for p in user_platforms ])
+ platforms.update([ "%s-debug" % p for p in user_platforms ])
return platforms
-def basePlatform(platform):
- '''Platform name without any 'try-nondefault' markers, whether at the
- beginning or in the middle of the string'''
- return platform.replace(' try-nondefault', '').replace('try-nondefault ', '')
-
def getPlatformBuilders(user_platforms, builderNames, buildTypes, prettyNames):
'''Return builder names that are found in both prettyNames[p] for some
(expanded) platform p, and in builderNames'''
@@ -63,17 +58,13 @@ def getPlatformBuilders(user_platforms, builderNames, buildTypes, prettyNames):
return []
platforms = expandPlatforms(user_platforms, buildTypes)
- builders = [ basePlatform(prettyNames[p])
- for p in platforms.intersection(prettyNames) ]
+ builders = [ prettyNames[p] for p in platforms.intersection(prettyNames) ]
return list(set(builders).intersection(builderNames))
-def passesFilter(testFilters, test, pretty, isDefault):
+def passesFilter(testFilters, test, pretty):
if test not in testFilters:
- # No filter requested for test, so accept all defaults
- return isDefault
-
- # If a filter *has* been set, then ignore the try-nondefault flag;
- # everything is eligible for selection
+ # No filter requested for test, so accept anything
+ return True
# filters is a set of inclusion and exclusion rules. Exclusions begin with
# '-'. To be accepted, a pretty name must match at least one inclusion and
@@ -121,9 +112,8 @@ def getTestBuilders(platforms, testType, tests, testFilters, builderNames, build
if not isinstance(pretties, list):
pretties = [ pretties ]
for pretty in pretties:
- base_pretty = basePlatform(pretty)
- custom_builder = "%s %s %s %s %s" % (base_pretty, buildbotBranch, buildType, testType, test)
- if passesFilter(testFilters, test, custom_builder, base_pretty == pretty):
+ custom_builder = "%s %s %s %s %s" % (pretty, buildbotBranch, buildType, testType, test)
+ if passesFilter(testFilters, test, custom_builder):
testBuilders.add(custom_builder)
# we do all but debug win32 over on test masters so have to check the
@@ -132,19 +122,17 @@ def getTestBuilders(platforms, testType, tests, testFilters, builderNames, build
assert platform.endswith('-debug')
for test in tests:
pretty = unittestPrettyNames[platform]
- base_pretty = basePlatform(pretty)
- debug_custom_builder = "%s %s" % (base_pretty, test)
- if passesFilter(testFilters, test, debug_custom_builder, base_pretty == pretty):
+ debug_custom_builder = "%s %s" % (pretty, test)
+ if passesFilter(testFilters, test, debug_custom_builder):
testBuilders.add(debug_custom_builder)
if testType == "talos":
for platform in set(platforms).intersection(prettyNames):
# check whether we do talos for this platform
for slave_platform in prettyNames[platform]:
- base_slave_platform = basePlatform(slave_platform)
for test in tests:
- custom_builder = "%s %s talos %s" % (base_slave_platform, buildbotBranch, test)
- if passesFilter(testFilters, test, custom_builder, base_slave_platform == slave_platform):
+ custom_builder = "%s %s talos %s" % (slave_platform, buildbotBranch, test)
+ if passesFilter(testFilters, test, custom_builder):
testBuilders.add(custom_builder)
return list(testBuilders.intersection(builderNames))
@@ -276,46 +264,25 @@ def TryParser(message, builderNames, prettyNames, unittestPrettyNames=None, unit
# for any input other than do/od, d, o, all set to default
options.build = ['opt','debug']
- if unittestSuites:
- all_platforms = prettyNames.keys()
- else:
- # for build builders (as opposed to test builders), check against the
- # prettyNames for -debug
- all_platforms = set()
- if 'debug' in options.build:
- all_platforms.update([ p for p in prettyNames.keys() if p.endswith('debug') ])
- if 'opt' in options.build:
- all_platforms.update([ p for p in prettyNames.keys() if not p.endswith('debug') ])
-
- # Strip off -debug. It gets tacked on in the getPlatformBuilders for
- # buildType == debug
- all_platforms = list(set([ p.replace('-debug', '') for p in all_platforms ]))
-
- # Platforms whose prettyNames all have 'try-nondefault' in them are not included in -p all
- default_platforms = set()
- if unittestSuites:
- for p in all_platforms:
- default_platforms.update([ p for n in prettyNames[p] if 'try-nondefault' not in n ])
- else:
- defaultPrettyNames = dict([ (k,v)
- for k,v in prettyNames.items()
- if 'try-nondefault' not in v ])
- for p in all_platforms:
- if p in defaultPrettyNames:
- default_platforms.add(p)
- elif p + '-debug' in defaultPrettyNames:
- default_platforms.add(p)
-
- user_platforms = set()
- for platform in options.user_platforms.split(','):
- if platform == 'all':
- user_platforms.update(default_platforms)
- elif platform == 'full':
- user_platforms.update(all_platforms)
+ if options.user_platforms == 'all' and prettyNames:
+ # test builder pretty names don't have -debug in them, so all gets all prettyNames
+ if options.test != 'none' and unittestSuites:
+ options.user_platforms = prettyNames.keys()
else:
- user_platforms.add(platform)
-
- options.user_platforms = user_platforms
+ # for builders though, you need to check against the prettyNames for -debug
+ options.user_platforms = []
+ for buildType in options.build:
+ for platform in prettyNames.keys():
+ if buildType == 'debug' and platform.endswith('debug'):
+ # append platform with the -debug stripped off
+ # it gets tacked on in the getPlatformBuilders for buildType == debug
+ options.user_platforms.append(platform.split('-')[0])
+ elif buildType == 'opt' and not platform.endswith('debug'):
+ options.user_platforms.append(platform)
+ elif options.user_platforms == 'none':
+ options.user_platforms = []
+ else:
+ options.user_platforms = options.user_platforms.split(',')
testFilters = None
if unittestSuites:
Please sign in to comment.
Something went wrong with that request. Please try again.