Bug 699838 - allow for custom --sampleConfig to run several iterations on pine branch for metrics a=armenzg
authorLukas Blakk <lsblakk@mozilla.com>
Tue, 22 Nov 2011 14:46:50 -0800
changeset 5102 d60ef4307c45ef56725a3c1110abb34a27afce07
parent 5101 de57a624cc81151658037bf0b41f8dbcd1de9ad9
child 5103 65c113349978256cd7fd34ed429f76f2f1188ab8
push id1
push userroot
push dateWed, 17 Dec 2014 00:18:48 +0000
reviewersarmenzg
bugs699838
Bug 699838 - allow for custom --sampleConfig to run several iterations on pine branch for metrics a=armenzg
mozilla-tests/config.py
mozilla-tests/tests_master.cfg
mozilla-tests/universal_master_sqlite.cfg
mozilla/project_branches.py
--- a/mozilla-tests/config.py
+++ b/mozilla-tests/config.py
@@ -430,29 +430,39 @@ def loadDefaultValues(BRANCHES, branch, 
     BRANCHES[branch]['talos_command'] = branchConfig.get('talos_cmd', TALOS_CMD)
     BRANCHES[branch]['fetch_symbols'] = branchConfig.get('fetch_symbols', True)
     BRANCHES[branch]['support_url_base'] = branchConfig.get('support_url_base', 'http://build.mozilla.org/talos')
     BRANCHES[branch]['enable_unittests'] = branchConfig.get('enable_unittests', True)
     BRANCHES[branch]['pgo_strategy'] = branchConfig.get('pgo_strategy', None)
 
 def loadCustomTalosSuites(BRANCHES, SUITES, branch, branchConfig):
     coallesceJobs = branchConfig.get('coallesce_jobs', True)
+    BRANCHES[branch]['suites'] = deepcopy(SUITES)
     # Check if Talos is enabled, if False, set 0 runs for all suites
     if branchConfig.get('enable_talos') == False:
         branchConfig['talos_suites'] = {}
         for suite in SUITES.keys():
             branchConfig['talos_suites'][suite]  = 0
 
-    # Want to turn on/off a talos suite? Set it in the PROJECT_BRANCHES[branch]['talos_suites'] otherwise, defaults below
+    # Want to turn on/off a talos suite? Set it in the PROJECT_BRANCHES[branch]['talos_suites'] 
+    # This is the default and will make all talosConfig.get(key,0) calls
+    # to default to 0 a.k.a. disabled suite
+    talosConfig = {}
     if branchConfig.get('talos_suites'):
-        talosConfig = branchConfig['talos_suites']
-    else:
-        # This is the default and will make all talosConfig.get(key,0) calls
-        # to default to 0 a.k.a. disabled suite
-        talosConfig = {}
+        for suite, settings in branchConfig['talos_suites'].items():
+            # Normally the setting is just 0 or 1 for talosConfig to enable/disable a test
+            # If there's a list, value[0] is the enabling flag and [1] is a dict of customization
+            if isinstance(settings, list):
+                talosConfig[suite] = settings[0]
+                # append anything new in 'suites' for a talos_suite
+                for key, value in settings[1].items():
+                    if suite in SUITES.keys():
+                        BRANCHES[branch]['suites'][suite][key] += value
+            else:
+                talosConfig[suite] = settings
 
     for suite in SUITES.keys():
         if not SUITES[suite]['enable_by_default']:
             # Suites that are turned off by default
             BRANCHES[branch][suite + '_tests'] = (talosConfig.get(suite, 0), coallesceJobs) + SUITES[suite]['options']
         else:
             # Suites that are turned on by default
             BRANCHES[branch][suite + '_tests'] = (talosConfig.get(suite, 1), coallesceJobs) + SUITES[suite]['options']
--- a/mozilla-tests/tests_master.cfg
+++ b/mozilla-tests/tests_master.cfg
@@ -66,17 +66,17 @@ from buildbotcustom.misc import generate
          mergeBuildObjects
 
 from buildbot.schedulers.triggerable import Triggerable
 
 buildObjects = {}
 
 for branch in ACTIVE_BRANCHES:
     talosObjects = generateTalosBranchObjects(branch, BRANCHES[branch],
-                                                ACTIVE_PLATFORMS, SUITES,
+                                                ACTIVE_PLATFORMS, BRANCHES[branch].get('suites', SUITES),
                                                 BRANCH_UNITTEST_VARS['platforms'])
     buildObjects = mergeBuildObjects(buildObjects, talosObjects)
 
 for project in ACTIVE_PROJECTS:
     projectObjects = generateProjectObjects(project, PROJECTS[project], SLAVES)
     buildObjects = mergeBuildObjects(buildObjects, projectObjects)
 
 # We only want builders, status objects
--- a/mozilla-tests/universal_master_sqlite.cfg
+++ b/mozilla-tests/universal_master_sqlite.cfg
@@ -66,17 +66,17 @@ from buildbotcustom.misc import generate
          mergeBuildObjects
 
 from buildbot.schedulers.triggerable import Triggerable
 
 buildObjects = {}
 
 for branch in ACTIVE_BRANCHES:
     talosObjects = generateTalosBranchObjects(branch, BRANCHES[branch],
-                                                ACTIVE_PLATFORMS, SUITES,
+                                                ACTIVE_PLATFORMS, BRANCHES[branch].get('suites', SUITES),
                                                 BRANCH_UNITTEST_VARS['platforms'])
     buildObjects = mergeBuildObjects(buildObjects, talosObjects)
 
 for project in ACTIVE_PROJECTS:
     projectObjects = generateProjectObjects(project, PROJECTS[project], SLAVES)
     buildObjects = mergeBuildObjects(buildObjects, projectObjects)
 
 c['builders'].extend(buildObjects['builders'])
--- a/mozilla/project_branches.py
+++ b/mozilla/project_branches.py
@@ -136,17 +136,16 @@ PROJECT_BRANCHES = {
     'ux': {
         'branch_name': 'UX',
         'mobile_branch_name': 'UX',
         'build_branch': 'UX',
         'tinderbox_tree': 'UX',
         'mobile_tinderbox_tree': 'UX',
         'packaged_unittest_tinderbox_tree': 'UX',
         'enabled_products': ['firefox'],
-        'enable_mobile': False,
         'mozconfig_dir' : 'ux',
         'enable_nightly': True,
         'create_snippet': True,
         'create_partial': True,
         'platforms': {
             'macosx-debug': {
                 'dont_build': True,
             },
@@ -231,17 +230,40 @@ PROJECT_BRANCHES = {
         'platforms': {
             'win32': {
                 'env': {
                     'MOCO_SIGNED_UPDATER_EXE': 'https://build.mozilla.org/clobberer/updater.exe',
                 }
             }
         }
     },
-    'pine': {},
+    'pine': {
+        'enable_unittests': False,
+        'enabled_products': ['firefox'],
+        'talos_suites': {
+            'tp': [1, {'suites': ['--sampleConfig', 'cycles.config']}],
+            'chrome': [1, {'suites': ['--sampleConfig', 'cycles.config']}],
+            'chrome_mac': [1, {'suites': ['--sampleConfig', 'cycles.config']}],
+            'nochrome': [1, {'suites': ['--sampleConfig', 'cycles.config']}],
+            'dirty': 0,
+            'svg': [1, {'suites': ['--sampleConfig', 'cycles.config']}],
+            'dromaeo': 0,
+            # hate that remote talos still show up when mobile product is not being requested
+            # but that's not part of the bug i'm doing this for, so leaving for now
+            'remote-ts': 0,
+            'remote-tdhtml': 0,
+            'remote-tsvg': 0,
+            'remote-tsspider': 0,
+            'remote-tpan': 0,
+            'remote-tp4m': 0,
+            'remote-tp4m_nochrome': 0,
+            'remote-twinopen': 0,
+            'remote-tzoom': 0,
+        },
+    },
 }
 
 # All is the default
 ACTIVE_PROJECT_BRANCHES = PROJECT_BRANCHES.keys()
 # Turning off graphics - bug 649507
 for branch in ('graphics',):
     ACTIVE_PROJECT_BRANCHES.remove(branch)