| OLD | NEW |
| (Empty) |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 from buildbot.changes import svnpoller | |
| 6 from buildbot.scheduler import Scheduler | |
| 7 from buildbot.scheduler import Triggerable | |
| 8 | |
| 9 from master import build_utils | |
| 10 from master import master_config | |
| 11 from master import master_utils | |
| 12 from master import slaves_list | |
| 13 from master.factory import chromium_factory | |
| 14 | |
| 15 import config | |
| 16 | |
| 17 ActiveMaster = config.Master.ChromiumPyauto | |
| 18 | |
| 19 # This is the dictionary that the buildmaster pays attention to. We also use | |
| 20 # a shorter alias to save typing. | |
| 21 c = BuildmasterConfig = {} | |
| 22 | |
| 23 # Disable compression for the stdio files. | |
| 24 c['logCompressionLimit'] = False | |
| 25 | |
| 26 config.DatabaseSetup(c, require_dbconfig=ActiveMaster.is_production_host) | |
| 27 | |
| 28 ####### CHANGESOURCES | |
| 29 | |
| 30 def ChromeTreeFileSplitter(path): | |
| 31 """split_file for the 'src' project in the trunk.""" | |
| 32 | |
| 33 # Exclude .DEPS.git from triggering builds on chrome. | |
| 34 if path == 'src/.DEPS.git': | |
| 35 return None | |
| 36 | |
| 37 # List of projects we are interested in. The project names must exactly | |
| 38 # match paths in the Subversion repository, relative to the 'path' URL | |
| 39 # argument. build_utils.SplitPath() will use them as branch names to | |
| 40 # kick off the Schedulers for different projects. | |
| 41 projects = ['src'] | |
| 42 return build_utils.SplitPath(projects, path) | |
| 43 | |
| 44 # Polls config.Master.trunk_url for changes | |
| 45 chromium_rev = 'http://src.chromium.org/viewvc/chrome?view=rev&revision=%s' | |
| 46 trunk_poller = svnpoller.SVNPoller(svnurl=config.Master.trunk_url, | |
| 47 split_file=ChromeTreeFileSplitter, | |
| 48 pollinterval=10, | |
| 49 revlinktmpl=chromium_rev) | |
| 50 | |
| 51 c['change_source'] = [trunk_poller] | |
| 52 | |
| 53 | |
| 54 ####### SCHEDULERS | |
| 55 | |
| 56 ## configure the Schedulers | |
| 57 | |
| 58 # Main scheduler for all changes in trunk. | |
| 59 s_chromium = Scheduler(name='chromium', | |
| 60 branch='src', | |
| 61 treeStableTimer=60, | |
| 62 builderNames=['Win7 QA', | |
| 63 'Mac 10.6 QA', | |
| 64 'Linux QA', | |
| 65 'Linux32 QA', | |
| 66 ]) | |
| 67 | |
| 68 c['schedulers'] = [s_chromium] | |
| 69 | |
| 70 ####### BUILDERS | |
| 71 | |
| 72 builders = [] | |
| 73 | |
| 74 # ---------------------------------------------------------------------------- | |
| 75 # FACTORIES | |
| 76 | |
| 77 m_win = chromium_factory.ChromiumFactory('src/build', 'win32') | |
| 78 m_linux = chromium_factory.ChromiumFactory('src/out', 'linux2') | |
| 79 m_mac = chromium_factory.ChromiumFactory('src/xcodebuild', 'darwin') | |
| 80 | |
| 81 # Some shortcut to simplify the code below. | |
| 82 F_WIN = m_win.ChromiumFactory | |
| 83 F_LINUX = m_linux.ChromiumFactory | |
| 84 F_MAC = m_mac.ChromiumFactory | |
| 85 | |
| 86 f_linux = F_LINUX(target='Release', | |
| 87 options=['chromium_builder_chromedriver'], | |
| 88 tests=['annotated_steps'], | |
| 89 factory_properties={ | |
| 90 'annotated_script': 'qa_buildbot_run.py', | |
| 91 'use_xvfb_on_linux': True, | |
| 92 'needs_webdriver_java_tests': True, | |
| 93 }) | |
| 94 | |
| 95 f_win7 = F_WIN(slave_type='Builder', | |
| 96 project='all.sln;chromium_builder_chromedriver', | |
| 97 target='Release', | |
| 98 tests=['annotated_steps'], | |
| 99 factory_properties={ | |
| 100 'annotated_script': 'qa_buildbot_run.py', | |
| 101 'trigger': 'win_trigger', | |
| 102 'needs_webdriver_java_tests': True, | |
| 103 }) | |
| 104 | |
| 105 f_mac_10_6 = F_MAC(slave_type='Builder', | |
| 106 target='Release', | |
| 107 options=['--', '-project', '../build/all.xcodeproj', | |
| 108 '-target', 'chromium_builder_chromedriver'], | |
| 109 tests=['annotated_steps'], | |
| 110 factory_properties={ | |
| 111 'annotated_script': 'qa_buildbot_run.py', | |
| 112 'needs_webdriver_java_tests': True, | |
| 113 }) | |
| 114 | |
| 115 # ---------------------------------------------------------------------------- | |
| 116 # BUILDER DEFINITIONS | |
| 117 | |
| 118 b_win7 = { | |
| 119 'name': 'Win7 QA', | |
| 120 'factory': f_win7, | |
| 121 'builddir': 'pyauto_win7', | |
| 122 'auto_reboot': False | |
| 123 } | |
| 124 b_linux = { | |
| 125 'name': 'Linux QA', | |
| 126 'factory': f_linux, | |
| 127 'auto_reboot': False | |
| 128 } | |
| 129 b_linux32 = { | |
| 130 'name': 'Linux32 QA', | |
| 131 'factory': f_linux, | |
| 132 'auto_reboot': False | |
| 133 } | |
| 134 b_mac10_6 = { | |
| 135 'name': 'Mac 10.6 QA', | |
| 136 'factory': f_mac_10_6, | |
| 137 'builddir': 'pyauto_mac_10_6', | |
| 138 'auto_reboot': False | |
| 139 } | |
| 140 | |
| 141 c['builders'] = [ | |
| 142 b_win7, | |
| 143 b_mac10_6, | |
| 144 b_linux, | |
| 145 b_linux32, | |
| 146 ] | |
| 147 | |
| 148 # Associate the slaves to the manual builders. The configuration is in | |
| 149 # slaves.cfg. | |
| 150 slaves = slaves_list.SlavesList('slaves.cfg', 'ChromiumPyauto') | |
| 151 for builder in c['builders']: | |
| 152 builder['slavenames'] = slaves.GetSlavesName(builder=builder['name']) | |
| 153 | |
| 154 ####### BUILDSLAVES | |
| 155 | |
| 156 # The 'slaves' list defines the set of allowable buildslaves. List all the | |
| 157 # slaves registered to a builder. Remove dupes. | |
| 158 c['slaves'] = master_utils.AutoSetupSlaves(c['builders'], | |
| 159 config.Master.GetBotPassword()) | |
| 160 | |
| 161 # Make sure everything works together. | |
| 162 master_utils.VerifySetup(c, slaves) | |
| 163 | |
| 164 ####### STATUS TARGETS | |
| 165 | |
| 166 # Adds common status and tools to this master. | |
| 167 master_utils.AutoSetupMaster(c, ActiveMaster, | |
| 168 public_html='../master.chromium/public_html', | |
| 169 templates=['../master.chromium/templates'], | |
| 170 enable_http_status_push=ActiveMaster.is_production_host) | |
| 171 | |
| 172 ####### PROJECT IDENTITY | |
| 173 | |
| 174 # Buildbot master url: | |
| 175 c['buildbotURL'] = 'http://build.chromium.org/buildbot/pyauto/' | |
| OLD | NEW |