Bug 589847 - removes valid_builders.py and gets try_parser validation info from config.py p=lsblakk r=catlee
authorLukas Blakk <lsblakk@mozilla.com>
Tue, 30 Nov 2010 11:57:50 -0800
changeset 1102 ba4d2c17b0b652334bbafe10da26ab67ed4e24d5
parent 1101 77ae75cbd378297c269549857e397563caa3c8d8
child 1103 9ce66f5691122adcc5a44bcc10b157349b2052ab
push id727
push userlsblakk@mozilla.com
push dateTue, 30 Nov 2010 19:58:16 +0000
reviewerscatlee
bugs589847
Bug 589847 - removes valid_builders.py and gets try_parser validation info from config.py p=lsblakk r=catlee
misc.py
misc_scheduler.py
scheduler.py
test/test_try_parser.py
try_parser.py
--- a/misc.py
+++ b/misc.py
@@ -493,40 +493,49 @@ def generateBranchObjects(config, name):
     builders = []
     unittestBuilders = []
     triggeredUnittestBuilders = []
     nightlyBuilders = []
     xulrunnerNightlyBuilders = []
     debugBuilders = []
     weeklyBuilders = []
     coverageBuilders = []
+    # prettyNames is a mapping to pass to the try_parser for validation
+    PRETTY_NAME = '%s build'
+    prettyNames = {}
+    unittestPrettyNames = {}
+    unittestSuites = []
     # These dicts provides mapping between en-US dep and nightly scheduler names
     # to l10n dep and l10n nightly scheduler names. It's filled out just below here.
     l10nBuilders = {}
     l10nNightlyBuilders = {}
     pollInterval = config.get('pollInterval', 60)
     l10nPollInterval = config.get('l10nPollInterval', 5*60)
     # generate a list of builders, nightly builders (names must be different)
     # for easy access
     for platform in config['platforms'].keys():
         pf = config['platforms'][platform]
         base_name = pf['base_name']
+        pretty_name = PRETTY_NAME % base_name
         if platform.endswith("-debug"):
-            debugBuilders.append('%s build' % base_name)
+            debugBuilders.append(pretty_name)
+            prettyNames[platform] = pretty_name
             # Debug unittests
             if pf.get('enable_unittests'):
                 test_builders = []
                 base_name = config['platforms'][platform.replace("-debug", "")]['base_name']
                 for suites_name, suites in config['unittest_suites']:
+                    unittestPrettyNames[platform] = '%s debug test' % base_name
                     test_builders.extend(generateTestBuilderNames('%s debug test' % base_name, suites_name, suites))
                 triggeredUnittestBuilders.append(('%s-%s-unittest' % (name, platform), test_builders, config.get('enable_merging', True)))
             # Skip l10n, unit tests and nightlies for debug builds
             continue
         else:
-            builders.append('%s build' % base_name)
+            builders.append(pretty_name)
+            prettyNames[platform] = pretty_name
 
         # Fill the l10n dep dict
         if config['enable_l10n'] and platform in config['l10n_platforms'] and \
            config['enable_l10n_onchange']:
                 l10nBuilders[base_name] = {}
                 l10nBuilders[base_name]['tree'] = config['l10n_tree']
                 l10nBuilders[base_name]['l10n_builder'] = \
                     '%s %s %s l10n dep' % (config['product_name'].capitalize(),
@@ -547,21 +556,23 @@ def generateBranchObjects(config, name):
             if config['enable_shark'] and platform.startswith('macosx'):
                 nightlyBuilders.append('%s shark' % base_name)
         # Regular unittest builds
         if pf.get('enable_unittests'):
             unittestBuilders.append('%s unit test' % base_name)
             test_builders = []
             for suites_name, suites in config['unittest_suites']:
                 test_builders.extend(generateTestBuilderNames('%s test' % base_name, suites_name, suites))
+                unittestPrettyNames[platform] = '%s test' % base_name
             triggeredUnittestBuilders.append(('%s-%s-unittest' % (name, platform), test_builders, config.get('enable_merging', True)))
         # Optimized unittest builds
         if pf.get('enable_opt_unittests'):
             test_builders = []
             for suites_name, suites in config['unittest_suites']:
+                unittestPrettyNames[platform] = '%s opt test' % base_name
                 test_builders.extend(generateTestBuilderNames('%s opt test' % base_name, suites_name, suites))
             triggeredUnittestBuilders.append(('%s-%s-opt-unittest' % (name, platform), test_builders, config.get('enable_merging', True)))
         if config['enable_codecoverage'] and platform in ('linux',):
             coverageBuilders.append('%s code coverage' % base_name)
         if config.get('enable_blocklist_update', False) and platform in ('linux',):
             weeklyBuilders.append('%s blocklist update' % base_name)
         if config['enable_xulrunner'] and platform not in ('wince',):
             xulrunnerNightlyBuilders.append('%s xulrunner' % base_name)
@@ -708,16 +719,17 @@ def generateBranchObjects(config, name):
     # this one gets triggered by the HG Poller
     # for Try we have a custom scheduler that can accept a function to read commit comments
     # in order to know what to schedule
     extra_args = {}
     if config.get('enable_try'):
         scheduler_class = makePropertiesScheduler(BuilderChooserScheduler, [buildUIDSchedFunc])
         extra_args['chooserFunc'] = tryChooser
         extra_args['numberOfBuildsToTrigger'] = 1
+        extra_args['prettyNames'] = prettyNames
     else:
         scheduler_class = makePropertiesScheduler(Scheduler, [buildIDSchedFunc, buildUIDSchedFunc])
 
     if not config.get('enable_merging', True):
         nomergeBuilders.extend(builders + unittestBuilders + debugBuilders)
         extra_args['treeStableTimer'] = None
     else:
         extra_args['treeStableTimer'] = 3*60
@@ -743,26 +755,30 @@ def generateBranchObjects(config, name):
             fileIsImportant=lambda c: isImportantL10nFile(c, config['l10n_modules']),
             properties={
                 'app': 'browser',
                 'en_revision': 'default',
                 'l10n_revision': 'default',
                 }
         ))
 
-
     for scheduler_branch, test_builders, merge in triggeredUnittestBuilders:
         scheduler_name = scheduler_branch
+        for test in test_builders:
+            unittestSuites.append(test.split(' ')[-1])
         if not merge:
             nomergeBuilders.extend(test_builders)
         extra_args = {}
         if config.get('enable_try'):
             scheduler_class = BuilderChooserScheduler
             extra_args['chooserFunc'] = tryChooser
             extra_args['numberOfBuildsToTrigger'] = 1
+            extra_args['prettyNames'] = prettyNames
+            extra_args['unittestSuites'] = unittestSuites
+            extra_args['unittestPrettyNames'] = unittestPrettyNames
         else:
             scheduler_class = Scheduler
         branchObjects['schedulers'].append(scheduler_class(
             name=scheduler_name,
             branch=scheduler_branch,
             builderNames=test_builders,
             treeStableTimer=None,
             **extra_args
@@ -2010,16 +2026,18 @@ def generateCCBranchObjects(config, name
 
 
 def generateTalosBranchObjects(branch, branch_config, PLATFORMS, SUITES,
         ACTIVE_UNITTEST_PLATFORMS, factory_class=TalosFactory):
     branchObjects = {'schedulers': [], 'builders': [], 'status': [], 'change_source': []}
     branch_builders = {}
     all_test_builders = {}
     all_builders = []
+    # prettyNames is a mapping to pass to the try_parser for validation
+    prettyNames = {}
 
     buildBranch = branch_config['build_branch']
     talosCmd = branch_config['talos_command']
 
     for platform, platform_config in PLATFORMS.items():
         if platform_config.get('is_mobile', False):
             branchName = branch_config['mobile_branch_name']
             tinderboxTree = branch_config['mobile_tinderbox_tree']
@@ -2029,16 +2047,21 @@ def generateTalosBranchObjects(branch, b
 
         if tinderboxTree not in branch_builders:
             branch_builders[tinderboxTree] = []
         if tinderboxTree not in all_test_builders:
             all_test_builders[tinderboxTree] = []
 
         for slave_platform in platform_config['slave_platforms']:
             platform_name = platform_config[slave_platform]['name']
+            # this is to handle how a platform has more than one slave platform
+            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:
                     continue
 
                 factory = factory_class(
                     OS=slave_platform.split('-')[0],
                     supportUrlBase=branch_config['support_url_base'],
@@ -2061,16 +2084,18 @@ def generateTalosBranchObjects(branch, b
                     'properties': {'branch': branch, 'platform': slave_platform, 'build_platform': platform},
                 }
                 if not merge:
                     nomergeBuilders.append(builder['name'])
                 extra_args = {}
                 if branch == "tryserver":
                     scheduler_class = BuilderChooserScheduler
                     extra_args['chooserFunc'] = tryChooser
+                    extra_args['prettyNames'] = prettyNames
+                    extra_args['talosSuites'] = SUITES.keys()
                 else:
                     scheduler_class = MultiScheduler
                 s = scheduler_class(
                         name='tests-%s-%s-%s-talos' % (branch, slave_platform, suite),
                         branch='%s-%s-talos' % (branch, platform),
                         treeStableTimer=None,
                         builderNames=[builder['name']],
                         numberOfBuildsToTrigger=tests,
@@ -2078,16 +2103,18 @@ def generateTalosBranchObjects(branch, b
                         )
                 branchObjects['schedulers'].append(s)
                 branchObjects['builders'].append(builder)
                 branch_builders[tinderboxTree].append(builder['name'])
                 all_builders.append(builder['name'])
 
             if platform in ACTIVE_UNITTEST_PLATFORMS.keys() and branch_config.get('enable_unittests', True):
                 testTypes = []
+                # unittestSuites are gathered up for each platform from config.py
+                unittestSuites = []
 
                 if branch_config['platforms'][platform].get('enable_opt_unittests'):
                     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')
 
@@ -2119,24 +2146,28 @@ def generateTalosBranchObjects(branch, b
                         branchObjects['builders'].extend(generateTestBuilder(
                                 branch_config, branch, platform, "%s %s %s test" % (platform_name, branch, test_type),
                                 "%s_%s_test" % (branch, slave_platform_name),
                                 suites_name, suites, branch_config.get('mochitest_leak_threshold', None),
                                 branch_config.get('crashtest_leak_threshold', None),
                                 platform_config[slave_platform]['slaves']))
 
                     for scheduler_name, test_builders, merge in triggeredUnittestBuilders:
+                        for test in test_builders:
+                            unittestSuites.append(test.split(' ')[-1])
                         scheduler_branch = ('%s-%s-%s-unittest' % (branch, platform, test_type))
                         if not merge:
                             nomergeBuilders.extend(test_builders)
                         extra_args = {}
                         if branch == "tryserver":
                             scheduler_class = BuilderChooserScheduler
                             extra_args['chooserFunc'] = tryChooser
                             extra_args['numberOfBuildsToTrigger'] = 1
+                            extra_args['prettyNames'] = prettyNames
+                            extra_args['unittestSuites'] = unittestSuites
                         else:
                             scheduler_class = Scheduler
                         branchObjects['schedulers'].append(scheduler_class(
                             name=scheduler_name,
                             branch=scheduler_branch,
                             builderNames=test_builders,
                             treeStableTimer=None,
                             **extra_args
@@ -2217,31 +2248,35 @@ def generateMobileBranchObjects(config, 
     #status plugins, changesources and schedulers that would do nothing
     if config.get('mobile_platforms'):
         if len(config['mobile_platforms']) < 1:
             return mobile_objects
     else:
         return mobile_objects
     builders = []
     nightlyBuilders = []
+    # prettyNames is a mapping to pass to the try_parser for validation
+    PRETTY_NAME = '%s build'
+    prettyNames = {}
     mobile_repo_name = config.get('mobile_repo_path').split('/')[-1]
     pollInterval = config.get('pollInterval', 60)
 
     #We could also make mobile_repo_path a list and iterate over that lise
     #here to allow for more than one mobile repository to be built against
     #one mozilla repository.  As there is currently a n:1 mapping between
     #mozilla repository and mobile repository I (jhford) choose not to 
     #implement this.
     for platform in config.get('mobile_platforms', {}).keys():
         render = {'branch': name,
                   'mobile_branch': mobile_repo_name,
                   'platform': platform,
         }
         pf=config['mobile_platforms'][platform]
         base_name = pf.get('base_name') % render
+        pretty_name = PRETTY_NAME % base_name
 
         createSnippet = False
         if config.get('create_mobile_snippet', None) and pf.get('update_platform', None):
             createSnippet = True
 
         factory_kwargs={
             'hgHost': pf.get('hghost', config.get('hghost')),
             'repoPath': pf.get('repo_path', config.get('repo_path')),
@@ -2338,17 +2373,18 @@ def generateMobileBranchObjects(config, 
                 'properties': {'branch': '%s-%s' % (name, mobile_repo_name),
                                'platform': platform,}
             }
             nightlyBuilders.append(builder_name)
             mobile_objects['builders'].append(builder)
 
         if pf.get('enable_mobile_dep', config.get('enable_mobile_dep', True)):
             builddir = '%s-build' % builddir_base
-            builder_name = '%s build' % base_name
+            builder_name = pretty_name
+            prettyNames[platform] = pretty_name
 
             dep_kwargs = deepcopy(factory_kwargs)
             factory = factory_class(**dep_kwargs)
 
             builder ={
                 'name': builder_name,
                 'slavenames': pf.get('slaves'),
                 'builddir': builddir,
@@ -2402,16 +2438,17 @@ def generateMobileBranchObjects(config, 
         ))
 
     #this scheduler is to trigger mobile builds on a mozilla change
     extra_args = {}
     if config.get('enable_try'):
         scheduler_class = BuilderChooserScheduler
         extra_args['chooserFunc'] = tryChooser
         extra_args['numberOfBuildsToTrigger'] = 1
+        extra_args['prettyNames'] = prettyNames
     else:
         scheduler_class = Scheduler
 
     mobile_objects['schedulers'].append(scheduler_class(
         name='%s-%s-build-mozilla' % (name, mobile_repo_name),
         branch=config.get('repo_path'),
         treeStableTimer=None if config.get('enable_try') else 3*60,
         builderNames=builders,
--- a/misc_scheduler.py
+++ b/misc_scheduler.py
@@ -36,21 +36,22 @@ def tryChooser(s, all_changes):
                 if match:
                     return change['desc'].encode("utf8", "replace")
 
     def parseData(comments, c):
         if not comments:
             # still need to parse a comment string to get the default set
             log.msg("No comments, passing empty string which will result in default set")
             comments = ""
-        customBuilders = TryParser(comments, s.builderNames)
+        customBuilders = TryParser(comments, s.builderNames, s.prettyNames, s.unittestPrettyNames,
+                          s.unittestSuites, s.talosSuites)
         buildersPerChange[c] = customBuilders
 
     def parseDataError(failure, c):
-        log.msg("Couldn't parse data: Requesting default try set.")
+        log.msg("Couldn't parse data: Requesting default try set. %s" % failure)
         parseData("", c)
 
     for c in all_changes:
       try:
         match = re.search("try", c.branch)
         if not match:
             log.msg("Ignoring off-branch %s" % c.branch)
             continue
--- a/scheduler.py
+++ b/scheduler.py
@@ -110,21 +110,25 @@ class PersistentScheduler(BaseScheduler)
             for i in range(0, count):
                 self.create_buildset(ssid, "scheduler", t, builderNames=[builderName])
 
         # Try again in a bit
         self.lastCheck = now()
         return now() + self.pollInterval
 
 class BuilderChooserScheduler(MultiScheduler):
-    compare_attrs = MultiScheduler.compare_attrs + ('chooserFunc',)
-    def __init__(self, chooserFunc, **kwargs):
+    compare_attrs = MultiScheduler.compare_attrs + ('chooserFunc', 'prettyNames', 
+                     'unittestPrettyNames', 'unittestSuites', 'talosSuites')
+    def __init__(self, chooserFunc, prettyNames=None, unittestPrettyNames=None, unittestSuites=None, talosSuites=None, **kwargs):
         self.chooserFunc = chooserFunc
+        self.prettyNames = prettyNames
+        self.unittestPrettyNames = unittestPrettyNames
+        self.unittestSuites = unittestSuites
+        self.talosSuites = talosSuites
         MultiScheduler.__init__(self, **kwargs)
-
     def run(self):
         db = self.parent.db
         d = db.runInteraction(self.classify_changes)
         d.addCallback(lambda ign: db.runInteraction(self._process_changes))
         d.addCallback(self._maybeRunChooser)
         return d
 
     def _process_changes(self, t):
--- a/test/test_try_parser.py
+++ b/test/test_try_parser.py
@@ -1,167 +1,163 @@
 from buildbotcustom.try_parser import TryParser
 import unittest
-from valid_builders import DESKTOP_BUILDERS, MOBILE_BUILDERS, TEST_BUILDERS, TALOS_BUILDERS
 
 ###### TEST CASES #####
 
-# ALL OVERRIDE
-# test that when try comments contain --all, that an entire run of everything is generated
-# this use case is to mimic an m-c run
-MESSAGE_ALL_OVERRIDE = "try: -a"
-RESULT_ALL_OVERRIDE = ['OS X 10.5.2 tryserver build', 'OS X 10.6.2 tryserver build', 'WINNT 5.2 tryserver build', 'Linux x86-64 tryserver build', 'Linux tryserver build', 'WINNT 5.2 tryserver leak test build', 'OS X 10.6.2 tryserver leak test build', 'Linux x86-64 tryserver leak test build', 'Linux tryserver leak test build', 'OS X 10.5.2 tryserver leak test build', 'Android R7 tryserver build', 'Maemo 5 GTK tryserver build', 'Maemo 5 QT tryserver build', 'Rev3 WINNT 6.1 x64 tryserver opt test mochitests-1/5', 'Rev3 WINNT 6.1 x64 tryserver opt test mochitests-2/5', 'Rev3 WINNT 6.1 x64 tryserver opt test mochitests-3/5', 'Rev3 WINNT 6.1 x64 tryserver opt test mochitests-4/5', 'Rev3 WINNT 6.1 x64 tryserver opt test mochitests-5/5', 'Rev3 WINNT 6.1 x64 tryserver opt test mochitest-other', 'Rev3 WINNT 6.1 x64 tryserver opt test reftest', 'Rev3 WINNT 6.1 x64 tryserver opt test crashtest', 'Rev3 WINNT 6.1 x64 tryserver opt test xpcshell', 'Rev3 WINNT 6.1 x64 tryserver opt test jsreftest', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test mochitests-1/5', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test mochitests-2/5', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test mochitests-3/5', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test mochitests-4/5', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test mochitests-5/5', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test mochitest-other', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test reftest', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test opengl', 'Rev3 MacOSX Leopard 10.5.8 tryserver debug test opengl', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test crashtest', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test xpcshell', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test jsreftest', 'Rev3 MacOSX Leopard 10.5.8 tryserver debug test mochitests-1/5', 'Rev3 MacOSX Leopard 10.5.8 tryserver debug test mochitests-2/5', 'Rev3 MacOSX Leopard 10.5.8 tryserver debug test mochitests-3/5', 'Rev3 MacOSX Leopard 10.5.8 tryserver debug test mochitests-4/5', 'Rev3 MacOSX Leopard 10.5.8 tryserver debug test mochitests-5/5', 'Rev3 MacOSX Leopard 10.5.8 tryserver debug test mochitest-other', 'Rev3 MacOSX Leopard 10.5.8 tryserver debug test reftest', 'Rev3 MacOSX Leopard 10.5.8 tryserver debug test crashtest', 'Rev3 MacOSX Leopard 10.5.8 tryserver debug test xpcshell', 'Rev3 MacOSX Leopard 10.5.8 tryserver debug test jsreftest', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test mochitests-1/5', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test mochitests-2/5', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test mochitests-3/5', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test mochitests-4/5', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test mochitests-5/5', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test mochitest-other', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test reftest', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test crashtest', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test xpcshell', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test jsreftest', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver debug test mochitests-1/5', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver debug test mochitests-2/5', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver debug test mochitests-3/5', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver debug test mochitests-4/5', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver debug test mochitests-5/5', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver debug test mochitest-other', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver debug test reftest', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver debug test crashtest', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver debug test xpcshell', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver debug test jsreftest', 'Rev3 WINNT 6.1 tryserver opt test mochitests-1/5', 'Rev3 WINNT 6.1 tryserver opt test mochitests-2/5', 'Rev3 WINNT 6.1 tryserver opt test mochitests-3/5', 'Rev3 WINNT 6.1 tryserver opt test mochitests-4/5', 'Rev3 WINNT 6.1 tryserver opt test mochitests-5/5', 'Rev3 WINNT 6.1 tryserver opt test mochitest-other', 'Rev3 WINNT 6.1 tryserver opt test reftest', 'Rev3 WINNT 6.1 tryserver opt test reftest-d2d', 'Rev3 WINNT 6.1 tryserver opt test crashtest', 'Rev3 WINNT 6.1 tryserver opt test xpcshell', 'Rev3 WINNT 6.1 tryserver opt test jsreftest', 'Rev3 Fedora 12x64 tryserver opt test mochitests-1/5', 'Rev3 Fedora 12x64 tryserver opt test mochitests-2/5', 'Rev3 Fedora 12x64 tryserver opt test mochitests-3/5', 'Rev3 Fedora 12x64 tryserver opt test mochitests-4/5', 'Rev3 Fedora 12x64 tryserver opt test mochitests-5/5', 'Rev3 Fedora 12x64 tryserver opt test mochitest-other', 'Rev3 Fedora 12x64 tryserver opt test opengl', 'Rev3 Fedora 12x64 tryserver debug test opengl', 'Rev3 Fedora 12x64 tryserver opt test reftest', 'Rev3 Fedora 12x64 tryserver opt test crashtest', 'Rev3 Fedora 12 tryserver opt test opengl', 'Rev3 Fedora 12 tryserver debug test opengl', 'Rev3 Fedora 12x64 tryserver opt test xpcshell', 'Rev3 Fedora 12x64 tryserver opt test jsreftest', 'Rev3 Fedora 12x64 tryserver debug test mochitests-1/5', 'Rev3 Fedora 12x64 tryserver debug test mochitests-2/5', 'Rev3 Fedora 12x64 tryserver debug test mochitests-3/5', 'Rev3 Fedora 12x64 tryserver debug test mochitests-4/5', 'Rev3 Fedora 12x64 tryserver debug test mochitests-5/5', 'Rev3 Fedora 12x64 tryserver debug test mochitest-other', 'Rev3 Fedora 12x64 tryserver debug test reftest', 'Rev3 Fedora 12x64 tryserver debug test crashtest', 'Rev3 Fedora 12x64 tryserver debug test xpcshell', 'Rev3 Fedora 12x64 tryserver debug test jsreftest', 'Rev3 Fedora 12 tryserver opt test mochitests-1/5', 'Rev3 Fedora 12 tryserver opt test mochitests-2/5', 'Rev3 Fedora 12 tryserver opt test mochitests-3/5', 'Rev3 Fedora 12 tryserver opt test mochitests-4/5', 'Rev3 Fedora 12 tryserver opt test mochitests-5/5', 'Rev3 Fedora 12 tryserver opt test mochitest-other', 'Rev3 Fedora 12 tryserver opt test reftest', 'Rev3 Fedora 12 tryserver opt test crashtest', 'Rev3 Fedora 12 tryserver opt test xpcshell', 'Rev3 Fedora 12 tryserver opt test jsreftest', 'Rev3 Fedora 12 tryserver debug test mochitests-1/5', 'Rev3 Fedora 12 tryserver debug test mochitests-2/5', 'Rev3 Fedora 12 tryserver debug test mochitests-3/5', 'Rev3 Fedora 12 tryserver debug test mochitests-4/5', 'Rev3 Fedora 12 tryserver debug test mochitests-5/5', 'Rev3 Fedora 12 tryserver debug test mochitest-other', 'Rev3 Fedora 12 tryserver debug test reftest', 'Rev3 Fedora 12 tryserver debug test crashtest', 'Rev3 Fedora 12 tryserver debug test xpcshell', 'Rev3 Fedora 12 tryserver debug test jsreftest', 'Rev3 WINNT 6.1 x64 tryserver talos nochrome', 'Rev3 WINNT 6.1 x64 tryserver talos dromaeo', 'Rev3 WINNT 6.1 x64 tryserver talos a11y', 'Rev3 WINNT 6.1 x64 tryserver talos svg', 'Rev3 WINNT 6.1 x64 tryserver talos chrome', 'Rev3 WINNT 6.1 x64 tryserver talos tp4', 'Rev3 WINNT 6.1 x64 tryserver talos dirty', 'Rev3 WINNT 6.1 x64 tryserver talos scroll', 'Rev3 MacOSX Leopard 10.5.8 tryserver talos nochrome', 'Rev3 MacOSX Leopard 10.5.8 tryserver talos cold', 'Rev3 MacOSX Leopard 10.5.8 tryserver talos dromaeo', 'Rev3 MacOSX Leopard 10.5.8 tryserver talos svg', 'Rev3 MacOSX Leopard 10.5.8 tryserver talos chrome', 'Rev3 MacOSX Leopard 10.5.8 tryserver talos tp4', 'Rev3 MacOSX Leopard 10.5.8 tryserver talos dirty', 'Rev3 MacOSX Leopard 10.5.8 tryserver talos scroll', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver talos nochrome', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver talos cold', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver talos dromaeo', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver talos svg', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver talos chrome', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver talos tp4', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver talos dirty', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver talos scroll', 'Rev3 WINNT 5.1 tryserver talos nochrome', 'Rev3 WINNT 5.1 tryserver talos dromaeo', 'Rev3 WINNT 5.1 tryserver talos a11y', 'Rev3 WINNT 5.1 tryserver talos svg', 'Rev3 WINNT 5.1 tryserver talos chrome', 'Rev3 WINNT 5.1 tryserver talos tp4', 'Rev3 WINNT 5.1 tryserver talos dirty', 'Rev3 WINNT 5.1 tryserver talos scroll', 'Rev3 WINNT 6.1 tryserver talos nochrome', 'Rev3 WINNT 6.1 tryserver talos dromaeo', 'Rev3 WINNT 6.1 tryserver talos a11y', 'Rev3 WINNT 6.1 tryserver talos svg', 'Rev3 WINNT 6.1 tryserver talos chrome', 'Rev3 WINNT 6.1 tryserver talos tp4', 'Rev3 WINNT 6.1 tryserver talos dirty', 'Rev3 WINNT 6.1 tryserver talos scroll', 'Rev3 Fedora 12x64 tryserver talos nochrome', 'Rev3 Fedora 12x64 tryserver talos cold', 'Rev3 Fedora 12x64 tryserver talos dromaeo', 'Rev3 Fedora 12x64 tryserver talos a11y', 'Rev3 Fedora 12x64 tryserver talos svg', 'Rev3 Fedora 12x64 tryserver talos chrome', 'Rev3 Fedora 12x64 tryserver talos tp4', 'Rev3 Fedora 12x64 tryserver talos dirty', 'Rev3 Fedora 12x64 tryserver talos scroll', 'Rev3 Fedora 12 tryserver talos nochrome', 'Rev3 Fedora 12 tryserver talos cold', 'Rev3 Fedora 12 tryserver talos dromaeo', 'Rev3 Fedora 12 tryserver talos a11y', 'Rev3 Fedora 12 tryserver talos svg', 'Rev3 Fedora 12 tryserver talos chrome', 'Rev3 Fedora 12 tryserver talos tp4', 'Rev3 Fedora 12 tryserver talos dirty', 'Rev3 Fedora 12 tryserver talos scroll', 'WINNT 5.2 tryserver debug test mochitests-1/5', 'WINNT 5.2 tryserver debug test mochitests-2/5', 'WINNT 5.2 tryserver debug test mochitests-3/5', 'WINNT 5.2 tryserver debug test mochitests-4/5', 'WINNT 5.2 tryserver debug test mochitests-5/5', 'WINNT 5.2 tryserver debug test mochitest-other', 'WINNT 5.2 tryserver debug test reftest', 'WINNT 5.2 tryserver debug test crashtest', 'WINNT 5.2 tryserver debug test xpcshell', 'WINNT 5.2 tryserver debug test jsreftest']
-
-#  DEFAULT SET
-# nothing in comments should give all available platforms opt & debug desktop builders, all mobile, all test, no talos
-# only try: in comments same as above
-MESSAGE_DEFAULT1 = ''
-MESSAGE_DEFAULT2 = "junk"
-RESULT_DEFAULT = ['OS X 10.5.2 tryserver build', 'OS X 10.6.2 tryserver build', 'WINNT 5.2 tryserver build', 'Linux x86-64 tryserver build', 'Linux tryserver build', 'WINNT 5.2 tryserver leak test build', 'OS X 10.6.2 tryserver leak test build', 'Linux x86-64 tryserver leak test build', 'Linux tryserver leak test build', 'OS X 10.5.2 tryserver leak test build', 'Android R7 tryserver build', 'Maemo 5 GTK tryserver build', 'Maemo 5 QT tryserver build', 'Rev3 WINNT 6.1 x64 tryserver opt test mochitests-1/5', 'Rev3 WINNT 6.1 x64 tryserver opt test mochitests-2/5', 'Rev3 WINNT 6.1 x64 tryserver opt test mochitests-3/5', 'Rev3 WINNT 6.1 x64 tryserver opt test mochitests-4/5', 'Rev3 WINNT 6.1 x64 tryserver opt test mochitests-5/5', 'Rev3 WINNT 6.1 x64 tryserver opt test mochitest-other', 'Rev3 WINNT 6.1 x64 tryserver opt test reftest', 'Rev3 WINNT 6.1 x64 tryserver opt test crashtest', 'Rev3 WINNT 6.1 x64 tryserver opt test xpcshell', 'Rev3 WINNT 6.1 x64 tryserver opt test jsreftest', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test mochitests-1/5', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test mochitests-2/5', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test mochitests-3/5', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test mochitests-4/5', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test mochitests-5/5', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test mochitest-other', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test reftest', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test crashtest', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test xpcshell', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test jsreftest', 'Rev3 MacOSX Leopard 10.5.8 tryserver debug test mochitests-1/5', 'Rev3 MacOSX Leopard 10.5.8 tryserver debug test mochitests-2/5', 'Rev3 MacOSX Leopard 10.5.8 tryserver debug test mochitests-3/5', 'Rev3 MacOSX Leopard 10.5.8 tryserver debug test mochitests-4/5', 'Rev3 MacOSX Leopard 10.5.8 tryserver debug test mochitests-5/5', 'Rev3 MacOSX Leopard 10.5.8 tryserver debug test mochitest-other', 'Rev3 MacOSX Leopard 10.5.8 tryserver debug test reftest', 'Rev3 MacOSX Leopard 10.5.8 tryserver debug test crashtest', 'Rev3 MacOSX Leopard 10.5.8 tryserver debug test xpcshell', 'Rev3 MacOSX Leopard 10.5.8 tryserver debug test jsreftest', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test mochitests-1/5', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test mochitests-2/5', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test mochitests-3/5', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test mochitests-4/5', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test mochitests-5/5', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test mochitest-other', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test reftest', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test crashtest', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test xpcshell', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test jsreftest', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver debug test mochitests-1/5', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver debug test mochitests-2/5', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver debug test mochitests-3/5', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver debug test mochitests-4/5', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver debug test mochitests-5/5', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver debug test mochitest-other', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver debug test reftest', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver debug test crashtest', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver debug test xpcshell', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver debug test jsreftest', 'Rev3 WINNT 6.1 tryserver opt test mochitests-1/5', 'Rev3 WINNT 6.1 tryserver opt test mochitests-2/5', 'Rev3 WINNT 6.1 tryserver opt test mochitests-3/5', 'Rev3 WINNT 6.1 tryserver opt test mochitests-4/5', 'Rev3 WINNT 6.1 tryserver opt test mochitests-5/5', 'Rev3 WINNT 6.1 tryserver opt test mochitest-other', 'Rev3 WINNT 6.1 tryserver opt test reftest', 'Rev3 WINNT 6.1 tryserver opt test reftest-d2d', 'Rev3 WINNT 6.1 tryserver opt test crashtest', 'Rev3 WINNT 6.1 tryserver opt test xpcshell', 'Rev3 WINNT 6.1 tryserver opt test jsreftest', 'Rev3 Fedora 12x64 tryserver opt test mochitests-1/5', 'Rev3 Fedora 12x64 tryserver opt test mochitests-2/5', 'Rev3 Fedora 12x64 tryserver opt test mochitests-3/5', 'Rev3 Fedora 12x64 tryserver opt test mochitests-4/5', 'Rev3 Fedora 12x64 tryserver opt test mochitests-5/5', 'Rev3 Fedora 12x64 tryserver opt test mochitest-other', 'Rev3 Fedora 12x64 tryserver opt test reftest', 'Rev3 Fedora 12x64 tryserver opt test crashtest', 'Rev3 Fedora 12x64 tryserver opt test xpcshell', 'Rev3 Fedora 12x64 tryserver opt test jsreftest', 'Rev3 Fedora 12x64 tryserver debug test mochitests-1/5', 'Rev3 Fedora 12x64 tryserver debug test mochitests-2/5', 'Rev3 Fedora 12x64 tryserver debug test mochitests-3/5', 'Rev3 Fedora 12x64 tryserver debug test mochitests-4/5', 'Rev3 Fedora 12x64 tryserver debug test mochitests-5/5', 'Rev3 Fedora 12x64 tryserver debug test mochitest-other', 'Rev3 Fedora 12x64 tryserver debug test reftest', 'Rev3 Fedora 12x64 tryserver debug test crashtest', 'Rev3 Fedora 12x64 tryserver debug test xpcshell', 'Rev3 Fedora 12x64 tryserver debug test jsreftest', 'Rev3 Fedora 12 tryserver opt test mochitests-1/5', 'Rev3 Fedora 12 tryserver opt test mochitests-2/5', 'Rev3 Fedora 12 tryserver opt test mochitests-3/5', 'Rev3 Fedora 12 tryserver opt test mochitests-4/5', 'Rev3 Fedora 12 tryserver opt test mochitests-5/5', 'Rev3 Fedora 12 tryserver opt test mochitest-other', 'Rev3 Fedora 12 tryserver opt test reftest', 'Rev3 Fedora 12 tryserver opt test crashtest', 'Rev3 Fedora 12 tryserver opt test xpcshell', 'Rev3 Fedora 12 tryserver opt test jsreftest', 'Rev3 Fedora 12 tryserver debug test mochitests-1/5', 'Rev3 Fedora 12 tryserver debug test mochitests-2/5', 'Rev3 Fedora 12 tryserver debug test mochitests-3/5', 'Rev3 Fedora 12 tryserver debug test mochitests-4/5', 'Rev3 Fedora 12 tryserver debug test mochitests-5/5', 'Rev3 Fedora 12 tryserver debug test mochitest-other', 'Rev3 Fedora 12 tryserver debug test reftest', 'Rev3 Fedora 12 tryserver debug test crashtest', 'Rev3 Fedora 12 tryserver debug test xpcshell', 'Rev3 Fedora 12 tryserver debug test jsreftest', 'WINNT 5.2 tryserver debug test mochitests-1/5', 'WINNT 5.2 tryserver debug test mochitests-2/5', 'WINNT 5.2 tryserver debug test mochitests-3/5', 'WINNT 5.2 tryserver debug test mochitests-4/5', 'WINNT 5.2 tryserver debug test mochitests-5/5', 'WINNT 5.2 tryserver debug test mochitest-other', 'WINNT 5.2 tryserver debug test reftest', 'WINNT 5.2 tryserver debug test crashtest', 'WINNT 5.2 tryserver debug test xpcshell', 'WINNT 5.2 tryserver debug test jsreftest', 'Rev3 Fedora 12x64 tryserver opt test opengl', 'Rev3 Fedora 12x64 tryserver debug test opengl', 'Rev3 Fedora 12 tryserver opt test opengl', 'Rev3 Fedora 12 tryserver debug test opengl', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test opengl', 'Rev3 MacOSX Leopard 10.5.8 tryserver debug test opengl']
-
-# Test Bad data should get opt & debug linux builds since 'junk' is not a valid input
-MESSAGE_BUILD_JUNK = "try: -b junk -p linux -u none" 
-RESULT_JUNK = ['Linux tryserver build', 'Linux tryserver leak test build', 'Android R7 tryserver build', 'Maemo 5 GTK tryserver build', 'Maemo 5 QT tryserver build']
-
-# SPECIFYING opt/debug
-MESSAGE_BUILD_D = "try: -b d -p linux -u none"
-MESSAGE_BUILD_O = "try: -b o -p linux -u none"
-MESSAGE_BUILD_DO = "try: -b do -p linux -u none"
-MESSAGE_BUILD_OD = "try: -b od -p linux -u none"
-# should result in those desktop, all mobile, no tests/talos
-RESULT_D = ['Linux tryserver leak test build', 'Android R7 tryserver build', 'Maemo 5 GTK tryserver build', 'Maemo 5 QT tryserver build']
-RESULT_O = ['Linux tryserver build', 'Android R7 tryserver build', 'Maemo 5 GTK tryserver build', 'Maemo 5 QT tryserver build']
-RESULT_DO = ['Linux tryserver build', 'Linux tryserver leak test build', 'Android R7 tryserver build', 'Maemo 5 GTK tryserver build', 'Maemo 5 QT tryserver build']
-RESULT_OD = ['Linux tryserver build', 'Linux tryserver leak test build', 'Android R7 tryserver build', 'Maemo 5 GTK tryserver build', 'Maemo 5 QT tryserver build']
+BUILDER_PRETTY_NAMES = {'macosx64':'OS X 10.6.2 tryserver build', 'win32':'WINNT 5.2 tryserver build', 'win32-debug':'WINNT 5.2 tryserver leak test build', 'linux-64':'Linux x86-64 tryserver build', 'linux':'Linux tryserver build', 'macosx64-debug':'OS X 10.6.2 tryserver leak test build', 'linux64-debug':'Linux x86-64 tryserver leak test build', 'linux-debug':'Linux tryserver leak test build', 'macosx-debug':'OS X 10.5.2 tryserver leak test build', 'android-r7':'Android R7 tryserver build', 'maemo5-gtk':'Maemo 5 GTK tryserver 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 10.5.8'], 'win32':['Rev3 WINNT 5.1', 'Rev3 WINNT 6.1'], 'linux-64':['Rev3 Fedora 12x64'], 'linux':['Rev3 Fedora 12']}
+UNITTEST_PRETTY_NAMES = {'win32-debug':'WINNT 5.2 tryserver debug test'}
 
-# SPECIFIC PLATFORMS
-MESSAGE_MAC_ONLY = "try: -b o -p macosx,macosx64 -m none -u none"
-RESULT_MAC_ONLY = ['OS X 10.5.2 tryserver build', 'OS X 10.6.2 tryserver build']
-
-# MOBILE ONLY AND MOBILE SELECT
-#--p none -- this also tests what happens if you don't specify --build
-MESSAGE_MOBILE_ONLY = "try: -p none -u none"
-RESULT_MOBILE_ONLY = ['Android R7 tryserver build', 'Maemo 5 GTK tryserver build', 'Maemo 5 QT tryserver build']
-MESSAGE_MOBILE_SELECT = "try: -p none -m android-r7,maemo5-qt -u none"
-RESULT_MOBILE_SELECT = ['Android R7 tryserver build', 'Maemo 5 QT tryserver build']
+TALOS_SUITES = ['tp4', 'chrome']
+UNITTEST_SUITES = ['reftest', 'crashtest', 'mochitests-1/5', 'mochitests-3/5', 'mochitest-other']
 
-# TEST SUITES
-# test for 'all' and test for selective just opt
-MESSAGE_ALL_TESTS = "try: -b o -u all"
-MESSAGE_SELECT_TESTS = "try: -b o -p linux -u reftest,crashtest,mochitest-1,mochitest-4"
-MESSAGE_SELECT_MOCHITESTS = "try: -b o -p linux -u mochitests"
-RESULT_ALL_TESTS = ['OS X 10.5.2 tryserver build', 'OS X 10.6.2 tryserver build', 'WINNT 5.2 tryserver build', 'Linux x86-64 tryserver build', 'Linux tryserver build', 'Android R7 tryserver build', 'Maemo 5 GTK tryserver build', 'Maemo 5 QT tryserver build', 'Rev3 WINNT 6.1 x64 tryserver opt test mochitests-1/5', 'Rev3 WINNT 6.1 x64 tryserver opt test mochitests-2/5', 'Rev3 WINNT 6.1 x64 tryserver opt test mochitests-3/5', 'Rev3 WINNT 6.1 x64 tryserver opt test mochitests-4/5', 'Rev3 WINNT 6.1 x64 tryserver opt test mochitests-5/5', 'Rev3 WINNT 6.1 x64 tryserver opt test mochitest-other', 'Rev3 WINNT 6.1 x64 tryserver opt test reftest', 'Rev3 WINNT 6.1 x64 tryserver opt test crashtest', 'Rev3 WINNT 6.1 x64 tryserver opt test xpcshell', 'Rev3 WINNT 6.1 x64 tryserver opt test jsreftest', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test mochitests-1/5', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test mochitests-2/5', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test mochitests-3/5', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test mochitests-4/5', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test mochitests-5/5', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test mochitest-other', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test reftest', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test crashtest', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test xpcshell', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test jsreftest', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test mochitests-1/5', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test mochitests-2/5', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test mochitests-3/5', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test mochitests-4/5', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test mochitests-5/5', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test mochitest-other', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test reftest', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test crashtest', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test xpcshell', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test jsreftest', 'Rev3 WINNT 6.1 tryserver opt test mochitests-1/5', 'Rev3 WINNT 6.1 tryserver opt test mochitests-2/5', 'Rev3 WINNT 6.1 tryserver opt test mochitests-3/5', 'Rev3 WINNT 6.1 tryserver opt test mochitests-4/5', 'Rev3 WINNT 6.1 tryserver opt test mochitests-5/5', 'Rev3 WINNT 6.1 tryserver opt test mochitest-other', 'Rev3 WINNT 6.1 tryserver opt test reftest', 'Rev3 WINNT 6.1 tryserver opt test reftest-d2d', 'Rev3 WINNT 6.1 tryserver opt test crashtest', 'Rev3 WINNT 6.1 tryserver opt test xpcshell', 'Rev3 WINNT 6.1 tryserver opt test jsreftest', 'Rev3 Fedora 12x64 tryserver opt test mochitests-1/5', 'Rev3 Fedora 12x64 tryserver opt test mochitests-2/5', 'Rev3 Fedora 12x64 tryserver opt test mochitests-3/5', 'Rev3 Fedora 12x64 tryserver opt test mochitests-4/5', 'Rev3 Fedora 12x64 tryserver opt test mochitests-5/5', 'Rev3 Fedora 12x64 tryserver opt test mochitest-other', 'Rev3 Fedora 12x64 tryserver opt test reftest', 'Rev3 Fedora 12x64 tryserver opt test crashtest', 'Rev3 Fedora 12x64 tryserver opt test xpcshell', 'Rev3 Fedora 12x64 tryserver opt test jsreftest', 'Rev3 Fedora 12 tryserver opt test mochitests-1/5', 'Rev3 Fedora 12 tryserver opt test mochitests-2/5', 'Rev3 Fedora 12 tryserver opt test mochitests-3/5', 'Rev3 Fedora 12 tryserver opt test mochitests-4/5', 'Rev3 Fedora 12 tryserver opt test mochitests-5/5', 'Rev3 Fedora 12 tryserver opt test mochitest-other', 'Rev3 Fedora 12 tryserver opt test reftest', 'Rev3 Fedora 12 tryserver opt test crashtest', 'Rev3 Fedora 12 tryserver opt test xpcshell', 'Rev3 Fedora 12 tryserver opt test jsreftest', 'Rev3 Fedora 12x64 tryserver opt test opengl', 'Rev3 Fedora 12x64 tryserver debug test opengl', 'Rev3 Fedora 12 tryserver opt test opengl', 'Rev3 Fedora 12 tryserver debug test opengl', 'Rev3 MacOSX Leopard 10.5.8 tryserver opt test opengl', 'Rev3 MacOSX Leopard 10.5.8 tryserver debug test opengl']
-RESULT_SELECT_TESTS = ['Linux tryserver build', 'Android R7 tryserver build', 'Maemo 5 GTK tryserver build', 'Maemo 5 QT tryserver build', 'Rev3 Fedora 12 tryserver opt test reftest', 'Rev3 Fedora 12 tryserver opt test crashtest', 'Rev3 Fedora 12 tryserver opt test mochitests-1/5', 'Rev3 Fedora 12 tryserver opt test mochitests-4/5']
-RESULT_SELECT_MOCHITESTS = ['Linux tryserver build', 'Android R7 tryserver build', 'Maemo 5 GTK tryserver build', 'Maemo 5 QT tryserver build', 'Rev3 Fedora 12 tryserver opt test mochitests-2/5', 'Rev3 Fedora 12 tryserver opt test mochitests-3/5', 'Rev3 Fedora 12 tryserver opt test mochitests-1/5', 'Rev3 Fedora 12 tryserver opt test mochitests-4/5', 'Rev3 Fedora 12 tryserver opt test mochitests-5/5', 'Rev3 Fedora 12 tryserver opt test mochitest-other']
-  
-# TALOS SUITES
-# test for 'all' and test for selection
-MESSAGE_ALL_TALOS = "try: -b o -u none -t all"
-MESSAGE_SELECT_TALOS = "try: -b o -p linux -m none -u none -t scroll,dromaeo,tp4"
-RESULT_ALL_TALOS = ['OS X 10.5.2 tryserver build', 'OS X 10.6.2 tryserver build', 'WINNT 5.2 tryserver build', 'Linux x86-64 tryserver build', 'Linux tryserver build',  'Android R7 tryserver build', 'Maemo 5 GTK tryserver build', 'Maemo 5 QT tryserver build','Rev3 WINNT 6.1 x64 tryserver talos nochrome', 'Rev3 WINNT 6.1 x64 tryserver talos dromaeo', 'Rev3 WINNT 6.1 x64 tryserver talos a11y', 'Rev3 WINNT 6.1 x64 tryserver talos svg', 'Rev3 WINNT 6.1 x64 tryserver talos chrome', 'Rev3 WINNT 6.1 x64 tryserver talos tp4', 'Rev3 WINNT 6.1 x64 tryserver talos dirty', 'Rev3 WINNT 6.1 x64 tryserver talos scroll', 'Rev3 MacOSX Leopard 10.5.8 tryserver talos nochrome', 'Rev3 MacOSX Leopard 10.5.8 tryserver talos cold', 'Rev3 MacOSX Leopard 10.5.8 tryserver talos dromaeo', 'Rev3 MacOSX Leopard 10.5.8 tryserver talos svg', 'Rev3 MacOSX Leopard 10.5.8 tryserver talos chrome', 'Rev3 MacOSX Leopard 10.5.8 tryserver talos tp4', 'Rev3 MacOSX Leopard 10.5.8 tryserver talos dirty', 'Rev3 MacOSX Leopard 10.5.8 tryserver talos scroll', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver talos nochrome', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver talos cold', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver talos dromaeo', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver talos svg', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver talos chrome', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver talos tp4', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver talos dirty', 'Rev3 MacOSX Snow Leopard 10.6.2 tryserver talos scroll', 'Rev3 WINNT 5.1 tryserver talos nochrome', 'Rev3 WINNT 5.1 tryserver talos dromaeo', 'Rev3 WINNT 5.1 tryserver talos a11y', 'Rev3 WINNT 5.1 tryserver talos svg', 'Rev3 WINNT 5.1 tryserver talos chrome', 'Rev3 WINNT 5.1 tryserver talos tp4', 'Rev3 WINNT 5.1 tryserver talos dirty', 'Rev3 WINNT 5.1 tryserver talos scroll', 'Rev3 WINNT 6.1 tryserver talos nochrome', 'Rev3 WINNT 6.1 tryserver talos dromaeo', 'Rev3 WINNT 6.1 tryserver talos a11y', 'Rev3 WINNT 6.1 tryserver talos svg', 'Rev3 WINNT 6.1 tryserver talos chrome', 'Rev3 WINNT 6.1 tryserver talos tp4', 'Rev3 WINNT 6.1 tryserver talos dirty', 'Rev3 WINNT 6.1 tryserver talos scroll', 'Rev3 Fedora 12x64 tryserver talos nochrome', 'Rev3 Fedora 12x64 tryserver talos cold', 'Rev3 Fedora 12x64 tryserver talos dromaeo', 'Rev3 Fedora 12x64 tryserver talos a11y', 'Rev3 Fedora 12x64 tryserver talos svg', 'Rev3 Fedora 12x64 tryserver talos chrome', 'Rev3 Fedora 12x64 tryserver talos tp4', 'Rev3 Fedora 12x64 tryserver talos dirty', 'Rev3 Fedora 12x64 tryserver talos scroll', 'Rev3 Fedora 12 tryserver talos nochrome', 'Rev3 Fedora 12 tryserver talos cold', 'Rev3 Fedora 12 tryserver talos dromaeo', 'Rev3 Fedora 12 tryserver talos a11y', 'Rev3 Fedora 12 tryserver talos svg', 'Rev3 Fedora 12 tryserver talos chrome', 'Rev3 Fedora 12 tryserver talos tp4', 'Rev3 Fedora 12 tryserver talos dirty', 'Rev3 Fedora 12 tryserver talos scroll']
-RESULT_SELECT_TALOS = ['Linux tryserver build', 'Rev3 Fedora 12 tryserver talos scroll', 'Rev3 Fedora 12 tryserver talos dromaeo', 'Rev3 Fedora 12 tryserver talos tp4']
-
-# TESTS AND TALOS BOTH BUILD TYPES -- note we do not have debug win32 tests yet on test-masters
-MESSAGE_TEST_AND_TALOS = "try: -b do -p win32 -u reftest -t nochrome,dirty"
-RESULT_TEST_AND_TALOS = ['WINNT 5.2 tryserver build', 'WINNT 5.2 tryserver leak test build', 'Android R7 tryserver build', 'Maemo 5 GTK tryserver build', 'Maemo 5 QT tryserver build', 'Rev3 WINNT 6.1 tryserver opt test reftest', 'WINNT 5.2 tryserver debug test reftest', 'Rev3 WINNT 5.1 tryserver talos nochrome', 'Rev3 WINNT 6.1 tryserver talos nochrome', 'Rev3 WINNT 5.1 tryserver talos dirty','Rev3 WINNT 6.1 tryserver talos dirty']
+VALID_UPN = ['WINNT 5.2 tryserver debug test mochitests-1/5', 'WINNT 5.2 tryserver debug test mochitests-3/5', 'WINNT 5.2 tryserver debug test mochitest-other', 'WINNT 5.2 tryserver debug test reftest', 'WINNT 5.2 tryserver debug test crashtest']
+VALID_BUILDER_NAMES = ['OS X 10.6.2 tryserver build', 'WINNT 5.2 tryserver build', 'Linux x86-64 tryserver build', 'Linux tryserver build', 'OS X 10.5.2 tryserver leak test build', 'OS X 10.6.2 tryserver leak test build', 'WINNT 5.2 tryserver leak test build', 'Linux x86-64 tryserver leak test build', 'Linux tryserver leak test build','Android R7 tryserver build', 'Maemo 5 GTK tryserver build']
+VALID_TESTER_NAMES = ['Rev3 Fedora 12 tryserver opt test crashtest', 'Rev3 WINNT 5.1 tryserver opt test reftest', 'Rev3 WINNT 6.1 tryserver opt test crashtest', 'Rev3 Fedora 12 tryserver opt test mochitest-other', 'Rev3 MacOSX Leopard 10.5.8 tryserver talos tp4', 'Rev3 WINNT 5.1 tryserver talos chrome', 'Rev3 WINNT 6.1 tryserver talos tp4', 'Rev3 WINNT 5.1 tryserver talos tp4', 'Rev3 WINNT 6.1 tryserver talos chrome']
 
 class TestTryParser(unittest.TestCase):
 
-    def setUp(self):
-        self.builderNames = DESKTOP_BUILDERS + MOBILE_BUILDERS + TEST_BUILDERS + TALOS_BUILDERS
+    def test_BlankMessage(self):
+        # Should get default set with blank input
+        tm = ""
+        self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
+        self.assertEqual(sorted(self.customBuilders),sorted(VALID_BUILDER_NAMES))
 
-    def test_DefaultSet(self):
-        print "Testing the default set with blank input"
-        self.customBuilders = TryParser(MESSAGE_DEFAULT1, self.builderNames)
-        for c in self.customBuilders:
-            if c not in RESULT_DEFAULT:
-                print "Missed a builder in MESSAGE_DEFAULT1"
+    def test_JunkMessageBuilders(self):
+        # Should get default set with junk input
+        tm = "try: junk"
+        self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
+        self.assertEqual(sorted(self.customBuilders),sorted(VALID_BUILDER_NAMES))
 
-        print "Testing the default set with junk input"
-        self.customBuilders = TryParser(MESSAGE_DEFAULT2, self.builderNames)
-        for c in self.customBuilders:
-            if c not in RESULT_DEFAULT:
-                print "Missed a builder in MESSAGE_DEFAULT2"
+    def test_JunkMessageTesters(self):
+        # Should get default set with junk input
+        tm = "try: junk"
+        self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, UNITTEST_SUITES)
+        builders = ['Rev3 Fedora 12 tryserver opt test crashtest', 'Rev3 WINNT 5.1 tryserver opt test reftest', 'Rev3 WINNT 6.1 tryserver opt test crashtest', 'Rev3 Fedora 12 tryserver opt test mochitest-other']
+        self.assertEqual(sorted(self.customBuilders),sorted(builders))
 
-        print "Testing the default set with junk input for --build"
-        self.customBuilders = TryParser(MESSAGE_BUILD_JUNK, self.builderNames)
-        self.assertEqual(self.customBuilders, RESULT_JUNK)
+    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 = ['Linux tryserver build','Linux tryserver 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 = ['Linux x86-64 tryserver leak test build', 'Linux tryserver leak test build']
+        self.assertEquals(sorted(self.customBuilders), sorted(builders))
 
-    def test_BuildType(self):
-        print "Testing build type selection: Debug only"
-        self.customBuilders = TryParser(MESSAGE_BUILD_D, self.builderNames)
-        self.assertEqual(self.customBuilders, RESULT_D)
-        print "Testing build type selection: Opt only"
-        self.customBuilders = TryParser(MESSAGE_BUILD_O, self.builderNames)
-        self.assertEqual(self.customBuilders, RESULT_O)
-        print "Testing build type selection: Both (DO)"
-        self.customBuilders = TryParser(MESSAGE_BUILD_DO, self.builderNames)
-        self.assertEqual(self.customBuilders, RESULT_DO)
-        print "Testing build type selection: Both (OD)"
-        self.customBuilders = TryParser(MESSAGE_BUILD_OD, self.builderNames)
-        self.assertEqual(self.customBuilders, RESULT_OD)
+    def test_OptOnlyBuild(self):
+        tm = "try: -b o -p macosx64,linux"
+        self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
+        builders = ['OS X 10.6.2 tryserver build', 'Linux tryserver build']
+        self.assertEquals(sorted(self.customBuilders), sorted(builders))
+
+    def test_BothBuildTypes(self):
+        # User can send 'do' or 'od' for both
+        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 = ['WINNT 5.2 tryserver build', 'WINNT 5.2 tryserver leak test build']
+            self.assertEquals(sorted(self.customBuilders), sorted(builders))
 
     def test_SpecificPlatform(self):
-        print "Testing a specific platform: Mac Only"
-        self.customBuilders = TryParser(MESSAGE_MAC_ONLY, self.builderNames)
-        self.assertEqual(self.customBuilders, RESULT_MAC_ONLY)
+        # Testing a specific platform, eg: mac only 
+        # 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 = ['OS X 10.6.2 tryserver build', 'OS X 10.6.2 tryserver leak test build', 'OS X 10.5.2 tryserver leak test build']
+        self.assertEquals(sorted(self.customBuilders), sorted(builders))
 
-    def test_MobileOnly(self):
-        print "Testing Mobile Only"
-        self.customBuilders = TryParser(MESSAGE_MOBILE_ONLY, self.builderNames)
-        self.assertEqual(self.customBuilders, RESULT_MOBILE_ONLY)
-
-    def test_MobileSelect(self):
-        print "Testing selective Mobile platforms"
-        self.customBuilders = TryParser(MESSAGE_MOBILE_SELECT, self.builderNames)
-        self.assertEqual(self.customBuilders, RESULT_MOBILE_SELECT)
+    def test_AllPlatforms(self):
+        tm = 'try: -b od -p all'
+        self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
+        builders = ['OS X 10.6.2 tryserver build', 'WINNT 5.2 tryserver build', 'Linux x86-64 tryserver build', 'Linux tryserver build', 'OS X 10.5.2 tryserver leak test build', 'OS X 10.6.2 tryserver leak test build', 'WINNT 5.2 tryserver leak test build', 'Linux x86-64 tryserver leak test build', 'Linux tryserver leak test build', 'Android R7 tryserver build', 'Maemo 5 GTK tryserver build']
+        self.assertEqual(sorted(self.customBuilders),sorted(builders))
 
     def test_AllTests(self):
-        print "Testing all tests"
-        self.customBuilders = TryParser(MESSAGE_ALL_TESTS, self.builderNames)
-        # Too many to put in the right order 
-        # so let's just make sure they are all present and accounted for
-        for c in self.customBuilders:
-            if c not in RESULT_ALL_TESTS:
-                print "Missed a Test builder"
+        tm = 'try: -b od -p win32 -u all'
+        # first test with getBuilders
+        self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES + VALID_UPN, BUILDER_PRETTY_NAMES, UNITTEST_PRETTY_NAMES, UNITTEST_SUITES)
+        builders = ['WINNT 5.2 tryserver build', 'WINNT 5.2 tryserver leak test build', 'WINNT 5.2 tryserver debug test mochitests-1/5', 'WINNT 5.2 tryserver debug test mochitests-3/5', 'WINNT 5.2 tryserver debug test mochitest-other', 'WINNT 5.2 tryserver debug test reftest', 'WINNT 5.2 tryserver debug test crashtest']
+        self.assertEqual(sorted(self.customBuilders),sorted(builders))
+        # second test with getTestBuilders
+        self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, UNITTEST_SUITES)
+        builders = ['Rev3 WINNT 5.1 tryserver opt test reftest', 'Rev3 WINNT 6.1 tryserver opt test crashtest']
+        self.assertEqual(sorted(self.customBuilders),sorted(builders))
+
+    def test_MochitestAliases(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 = ['WINNT 5.2 tryserver build', 'WINNT 5.2 tryserver leak test build', 'WINNT 5.2 tryserver debug test mochitest-other', 'WINNT 5.2 tryserver debug test mochitests-3/5', 'WINNT 5.2 tryserver debug test mochitests-1/5']
+        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 = ['WINNT 5.2 tryserver build', 'WINNT 5.2 tryserver leak test build', 'WINNT 5.2 tryserver debug test mochitest-other']
+        self.assertEqual(sorted(self.customBuilders),sorted(builders))
 
-    def test_SelectMochitests(self):
-        print "Testing select mochitests"
-        self.customBuilders = TryParser(MESSAGE_SELECT_MOCHITESTS, self.builderNames)
-        for c in self.customBuilders:
-            if c not in RESULT_SELECT_MOCHITESTS:
-                print "Missed a mochitest builder"
+    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 = ['WINNT 5.2 tryserver debug test mochitest-other', 'WINNT 5.2 tryserver debug test mochitests-3/5', 'WINNT 5.2 tryserver debug test mochitests-1/5']
+        self.assertEqual(sorted(self.customBuilders),sorted(builders))
 
-    def test_SelectTests(self):
-        print "Testing select tests"
-        self.customBuilders = TryParser(MESSAGE_SELECT_TESTS, self.builderNames)
-        self.assertEqual(self.customBuilders, RESULT_SELECT_TESTS)
+    def test_SelecTests(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 = ['WINNT 5.2 tryserver build', 'WINNT 5.2 tryserver leak test build', 'WINNT 5.2 tryserver debug test crashtest', 'WINNT 5.2 tryserver 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 = ['Rev3 WINNT 6.1 tryserver opt test crashtest']
+        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 = ['Linux tryserver build', 'Linux tryserver leak test build', 'WINNT 5.2 tryserver build', 'WINNT 5.2 tryserver 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)
+        builders = []
+        self.assertEqual(sorted(self.customBuilders),sorted(builders))
 
     def test_AllTalos(self):
-        print "Testing all talos"
-        self.customBuilders = TryParser(MESSAGE_ALL_TALOS, self.builderNames)
-        # Too many to put in the right order 
-        # so let's just make sure they are all present and accounted for
-        for c in self.customBuilders:
-            if c not in RESULT_ALL_TALOS:
-                print "Missed a Talos builder"
+        tm = 'try: -b od -p linux,win32,macosx -t all'
+        self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, None, TALOS_SUITES)
+        builders = ['Rev3 MacOSX Leopard 10.5.8 tryserver talos tp4', 'Rev3 WINNT 5.1 tryserver talos chrome', 'Rev3 WINNT 6.1 tryserver talos tp4', 'Rev3 WINNT 5.1 tryserver talos tp4', 'Rev3 WINNT 6.1 tryserver talos chrome']
+        self.assertEqual(sorted(self.customBuilders),sorted(builders))
 
-    def test_SelectTalos(self):
-        print "Testing select talos"
-        self.customBuilders = TryParser(MESSAGE_SELECT_TALOS, self.builderNames)
-        self.assertEqual(self.customBuilders, RESULT_SELECT_TALOS)
+    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 = ['Rev3 WINNT 6.1 tryserver talos tp4', 'Rev3 WINNT 5.1 tryserver talos tp4']
+        self.assertEqual(sorted(self.customBuilders),sorted(builders))
 
-    def test_TestsTalosBothBuilds(self):
-        print "Testing test, talos both build types"
-        self.customBuilders = TryParser(MESSAGE_TEST_AND_TALOS, self.builderNames)
-        self.assertEqual(self.customBuilders, RESULT_TEST_AND_TALOS)
+    def test_NoTalos(self):
+        tm = 'try: -b od -p linux,win32 -t none'
+        self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, TESTER_PRETTY_NAMES, None, None, TALOS_SUITES)
+        builders = []
+        self.assertEqual(sorted(self.customBuilders),sorted(builders))
 
     def test_AllOverride(self):
-        print "Testing -a override flag"
-        self.customBuilders = TryParser(MESSAGE_ALL_OVERRIDE, self.builderNames)
-        # Too many to put in the right order 
-        # so let's just make sure they are all present and accounted for
-        for c in self.customBuilders:
-            if c not in RESULT_ALL_OVERRIDE:
-                print "Missed a builder in the -a override test"
+        tm = 'try: -a'
+        # testing the getBuilders
+        self.customBuilders = TryParser(tm, VALID_BUILDER_NAMES, BUILDER_PRETTY_NAMES)
+        self.assertEqual(sorted(self.customBuilders),sorted(VALID_BUILDER_NAMES))
+        # test getting talos builders
+        self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, None, TALOS_SUITES)
+        talosBuilders = ['Rev3 MacOSX Leopard 10.5.8 tryserver talos tp4', 'Rev3 WINNT 5.1 tryserver talos chrome', 'Rev3 WINNT 6.1 tryserver talos tp4', 'Rev3 WINNT 5.1 tryserver talos tp4', 'Rev3 WINNT 6.1 tryserver talos chrome']
+        self.assertEqual(sorted(self.customBuilders),sorted(talosBuilders))
+        # test getting test builders
+        self.customBuilders = TryParser(tm, VALID_TESTER_NAMES, TESTER_PRETTY_NAMES, None, UNITTEST_SUITES)
+        testBuilders = ['Rev3 Fedora 12 tryserver opt test crashtest', 'Rev3 WINNT 5.1 tryserver opt test reftest', 'Rev3 WINNT 6.1 tryserver opt test crashtest', 'Rev3 Fedora 12 tryserver opt test mochitest-other']
+        self.assertEqual(sorted(self.customBuilders),sorted(testBuilders))
 
 if __name__ == '__main__':
     unittest.main()
\ No newline at end of file
--- a/try_parser.py
+++ b/try_parser.py
@@ -1,182 +1,169 @@
 # Mozilla Try Parser
 # Contributor(s):
 #   Lukas Blakk <lsblakk@mozilla.com>
 
 import argparse, re
 
 from twisted.python import log
 
-import buildbotcustom.valid_builders
-reload(buildbotcustom.valid_builders)
-
-from buildbotcustom.valid_builders import PRETTY_NAMES, DESKTOP_PLATFORMS, MOBILE_PLATFORMS, \
-                           TALOS_SUITES, UNITTEST_SUITES
-
 '''Given a list of arguments from commit message or info file
    returns only those builder names that should be built.'''
 
-def getMochitests(suites):
-  test_suites = []
-  for s in suites:
-    if s == 'mochitests': # for 'all' unittests
-      test_suites.extend(UNITTEST_SUITES['mochitests'].values())
-    elif s.startswith('mochitest-'): # checking user submitted list of suites
-      mochitest = UNITTEST_SUITES['mochitests'][s]
-      test_suites.append(mochitest)
-    else:
-      test_suites.append(s)
-  return test_suites
+def expandTestSuites(user_suites,valid_suites):
+    test_suites = []
+    for u in user_suites:
+        if u == 'mochitests':
+            for v in valid_suites:
+                if v.startswith('mochitest'):
+                    test_suites.append(v)
+        elif u == 'mochitest-o':
+            for v in valid_suites:
+                if re.search(u,v):
+                    test_suites.append(v)
+        elif u.startswith('mochitest-'):
+            num = u.split('-')[1]
+            for v in valid_suites:
+                if v.startswith('mochitest') and re.search(num,v.split('/')[0]):
+                    test_suites.append(v)
+        else:
+            # validate other test names
+            if u in valid_suites:
+                test_suites.append(u)
+    return test_suites
 
 def processMessage(message):
     match = re.search('try:',str(message))
     if match:
         message = message.strip().split('try: ', 1)
         message = message[1].split(' ')
     else:
         message =[""]
     return message
 
-def getDesktopBuilders(platforms, builderNames, buildTypes):
-    desktopBuilders = []
-
-    if platforms != 'none':
-        for buildType in buildTypes:
-            if buildType == 'opt':
-                buildType = 'build'
-            if buildType == 'debug':
-                buildType = 'leak test build'
+def getPlatformBuilders(user_platforms, builderNames, buildTypes, prettyNames):
+    platformBuilders = []
 
-            for platform in platforms:
-                platform = 'desktop_' + platform
-                if platform in PRETTY_NAMES.keys():
-                    custom_builder = "%s tryserver %s" % (PRETTY_NAMES[platform], buildType)
-                    if custom_builder in builderNames:
-                        desktopBuilders.extend([custom_builder])
-    return desktopBuilders
-
-def getMobileBuilders(platforms, builderNames):
-    mobileBuilders = []
+    if user_platforms != 'none':
+    # if user wants od - the platforms have -debug in them
+        for buildType in buildTypes:
+            for platform in user_platforms:
+              if buildType == 'debug':
+                  platform += '-debug'
+              if platform in prettyNames.keys():
+                  custom_builder = prettyNames[platform]
+                  if custom_builder in builderNames and custom_builder not in platformBuilders:
+                      platformBuilders.extend([custom_builder])
+    return platformBuilders
 
-    if platforms != 'none':
-        for platform in platforms:
-            if platform in ('win32', 'macosx', 'linux'):
-                platform = 'mobile_' + platform
-            if platform in PRETTY_NAMES.keys():
-                custom_builder = "%s tryserver build" % (PRETTY_NAMES[platform])
-                if custom_builder in builderNames:
-                    mobileBuilders.extend([custom_builder])
-    return mobileBuilders
-
-def getTestBuilders(platforms, testType, tests, builderNames, buildTypes):
+def getTestBuilders(platforms, testType, tests, builderNames, buildTypes, prettyNames, unittestPrettyNames):
     testBuilders = []
     # for all possible suites, add in the builderNames for that platform
     if tests != 'none':
         if testType == "test":
             for buildType in buildTypes:
                 for platform in platforms:
-                    for test in tests:
-                        # we only do opt unittests on Rev3 WINNT 6.1, the debug tests still run on pm02
-                        if platform == 'win32':
-                          if buildType == 'debug':
-                            custom_builder = "%s tryserver %s %s %s" % (PRETTY_NAMES['desktop_win32'], buildType, testType, test)
-                          else:
-                            custom_builder = "%s tryserver %s %s %s" % (PRETTY_NAMES[platform][1], buildType, testType, test)
-                        else:
-                            custom_builder = "%s tryserver %s %s %s" % (PRETTY_NAMES[platform], buildType, testType, test)
-                        if custom_builder in (builderNames):
-                            testBuilders.extend([custom_builder])
+                    # this is to catch debug unittests triggered on the build master
+                    # if the user asks for win32 with -b d
+                    if buildType == 'debug' and not platform.endswith('debug'):
+                        platform += '-debug'
+                    if platform in prettyNames.keys():
+                        for test in tests:
+                            for slave_platform in prettyNames[platform]:
+                                custom_builder = "%s tryserver %s %s %s" % (slave_platform, buildType, testType, test)
+                                # have to check that custom_builder is not already present
+                                if custom_builder in (builderNames) and custom_builder not in testBuilders:
+                                    testBuilders.extend([custom_builder])
+
+                    # we do all but debug win32 over on test masters so have to check the 
+                    # unittestPrettyNames platforms for local builder master unittests
+                    if unittestPrettyNames and unittestPrettyNames.has_key(platform):
+                         for test in tests:
+                             debug_custom_builder = "%s %s" % (unittestPrettyNames[platform], test)
+                             if debug_custom_builder in (builderNames) and debug_custom_builder not in testBuilders:
+                                 testBuilders.extend([debug_custom_builder])
+
         if testType == "talos":
             for platform in platforms:
                 for test in tests:
-                    if platform == 'win32':
-                        # we still do talos runs on win2k3 ie: WINNT 5.1
-                        for w in PRETTY_NAMES['win32']:
-                            custom_builder = "%s tryserver %s %s" % (w, testType, test)
-                            if custom_builder in (builderNames):
-                                testBuilders.extend([custom_builder])
-                    else:
-                        custom_builder = "%s tryserver %s %s" % (PRETTY_NAMES[platform], testType, test)
-                        if custom_builder in (builderNames):
+                    for slave_platform in prettyNames[platform]:
+                        custom_builder = "%s tryserver %s %s" % (slave_platform, testType, test)
+                        if custom_builder in (builderNames) and custom_builder not in testBuilders:
                             testBuilders.extend([custom_builder])
+
     return testBuilders
 
-def TryParser(message, builderNames):
+def TryParser(message, builderNames, prettyNames, unittestPrettyNames=None, unittestSuites=None, talosSuites=None):
 
     parser = argparse.ArgumentParser(description='Pass in a commit message and a list \
                                      and tryParse populates the list with the builderNames\
                                      that need schedulers.')
 
     parser.add_argument('--do-everything', '-a',
                         action='store_true',
                         dest='do_everything',
                         help='m-c override to do all builds, tests, talos just like a trunk push')
     parser.add_argument('--build', '-b',
                         default='do',
                         dest='build',
                         help='accepts the build types requested')
     parser.add_argument('--platform', '-p',
                         default='all',
-                        dest='desktop',
-                        help='provide a list of desktop platforms, or specify none (default is all)')
-    parser.add_argument('--mobile', '-m',
-                        default='all',
-                        dest='mobile',
-                        help='provide a list of mobile platform, or specify none (default is all)')
+                        dest='user_platforms',
+                        help='provide a list of platforms desired, or specify none (default is all)')
     parser.add_argument('--unittests', '-u',
                         default='all',
                         dest='test',
                         help='provide a list of unit tests, or specify all (default is None)')
     parser.add_argument('--talos', '-t',
                         default='none',
                         dest='talos',
                         help='provide a list of talos tests, or specify all (default is None)')
 
     (options, unknown_args) = parser.parse_known_args(processMessage(message))
 
-
     if options.do_everything:
         options.build = ['opt', 'debug']
-        options.desktop = 'all'
-        options.mobile = 'all'
+        options.user_platforms = 'all'
         options.test = 'all'
         options.talos = 'all'
 
     # Build options include a possible override of 'all' to get a buildset that matches m-c
     if options.build == 'do' or options.build == 'od':
         options.build = ['opt', 'debug']
     elif options.build == 'd':
         options.build = ['debug']
     elif options.build == 'o':
         options.build = ['opt']
     else:
         # for any input other than do/od, d, o, all set to default
         options.build = ['opt','debug']
 
-    if options.desktop == 'all':
-        options.desktop = DESKTOP_PLATFORMS
-    elif options.desktop != 'none':
-        options.desktop = options.desktop.split(',')
-
-    if options.mobile == 'all':
-        options.mobile = MOBILE_PLATFORMS
-    elif options.mobile != 'none':
-        options.mobile = options.mobile.split(',')
+    if options.user_platforms == 'all' and prettyNames:
+        options.user_platforms = prettyNames.keys()
+    elif options.user_platforms != 'none':
+        options.user_platforms = options.user_platforms.split(',')
 
     if options.test == 'all':
-        options.test = getMochitests(UNITTEST_SUITES)
+        options.test = unittestSuites
     elif options.test != 'none':
-        options.test = getMochitests(options.test.split(','))
-    if options.talos == 'all':
-        options.talos = TALOS_SUITES
-    elif options.talos != 'none':
-        options.talos = options.talos.split(',')
+        options.test = expandTestSuites(options.test.split(','), unittestSuites)
+
+    if talosSuites:
+      if options.talos == 'all':
+          options.talos = talosSuites
+      elif options.talos != 'none':
+          options.talos = options.talos.split(',')
 
-    # Get the custom builder names
-    customBuilderNames = getDesktopBuilders(options.desktop, builderNames, options.build)
-    customBuilderNames.extend(getMobileBuilders(options.mobile, builderNames))
-    customBuilderNames.extend(getTestBuilders(options.desktop, "test", options.test, 
-                              builderNames, options.build))
-    customBuilderNames.extend(getTestBuilders(options.desktop, "talos", options.talos, builderNames, 
-                              options.build))
+    # List for the custom builder names that match prettyNames passed in from misc.py
+    customBuilderNames = []
+    if options.user_platforms:
+        customBuilderNames = getPlatformBuilders(options.user_platforms, builderNames, options.build, prettyNames)
+
+        if options.test != 'none' and unittestSuites:
+            customBuilderNames.extend(getTestBuilders(options.user_platforms, "test", options.test, 
+                                      builderNames, options.build, prettyNames, unittestPrettyNames))
+        if options.talos != 'none' and talosSuites is not None:
+            customBuilderNames.extend(getTestBuilders(options.user_platforms, "talos", options.talos, builderNames, 
+                                      options.build, prettyNames, None))
 
     return customBuilderNames
\ No newline at end of file