| OLD | NEW |
| (Empty) |
| 1 # -*- python -*- | |
| 2 # ex: set syntax=python: | |
| 3 | |
| 4 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 5 # Use of this source code is governed by a BSD-style license that can be | |
| 6 # found in the LICENSE file. | |
| 7 | |
| 8 # This is the buildmaster config file for the 'chromium' bot. It must | |
| 9 # be installed as 'master.cfg' in your buildmaster's base directory | |
| 10 # (although the filename can be changed with the --basedir option to | |
| 11 # 'mktap buildbot master'). | |
| 12 | |
| 13 # It has one job: define a dictionary named BuildmasterConfig. This | |
| 14 # dictionary has a variety of keys to control different aspects of the | |
| 15 # buildmaster. They are documented in docs/config.xhtml . | |
| 16 | |
| 17 # This file follows this naming convention: | |
| 18 # Factories: f_cr_[dbg/rel]_[type] | |
| 19 # Builders: b_chromium_[dbg/rel]_[os]_[type] | |
| 20 # BuildDir: chromium-[dbg/rel]-[os]-[type] | |
| 21 # | |
| 22 # os = xp/vista/linux/mac | |
| 23 # type = perf | |
| 24 | |
| 25 from buildbot.changes import svnpoller | |
| 26 from buildbot.scheduler import Scheduler | |
| 27 from buildbot.scheduler import Triggerable | |
| 28 | |
| 29 from common import chromium_utils | |
| 30 | |
| 31 from master import build_utils | |
| 32 from master import master_config | |
| 33 from master import master_utils | |
| 34 from master import perf_count_notifier | |
| 35 from master import slaves_list | |
| 36 from master.factory import chromium_factory | |
| 37 | |
| 38 import config | |
| 39 import master_site_config | |
| 40 | |
| 41 ActiveMaster = master_site_config.ChromiumPerfAv | |
| 42 | |
| 43 # Enable PERF_NOTIFIER in production to send cmp@google.com perf alerts. | |
| 44 PERF_NOTIFIER = ActiveMaster.is_production_host | |
| 45 | |
| 46 # This is the dictionary that the buildmaster pays attention to. We also use | |
| 47 # a shorter alias to save typing. | |
| 48 c = BuildmasterConfig = {} | |
| 49 | |
| 50 # 'slavePortnum' defines the TCP port to listen on. This must match the value | |
| 51 # configured into the buildslaves (with their --master option) | |
| 52 c['slavePortnum'] = ActiveMaster.slave_port | |
| 53 | |
| 54 # Disable compression for the stdio files. | |
| 55 c['logCompressionLimit'] = False | |
| 56 | |
| 57 # Load the list of slaves. | |
| 58 slaves = slaves_list.SlavesList('slaves.cfg', 'ChromiumPerfAv') | |
| 59 | |
| 60 config.DatabaseSetup(c, require_dbconfig=ActiveMaster.is_production_host) | |
| 61 | |
| 62 ####### CHANGESOURCES | |
| 63 | |
| 64 # the 'change_source' list tells the buildmaster how it should find out about | |
| 65 # source code changes. Any class which implements IChangeSource can be added | |
| 66 # to this list: there are several in buildbot/changes/*.py to choose from. | |
| 67 def ChromeTreeFileSplitter(path): | |
| 68 """split_file for the 'src' project in the trunk.""" | |
| 69 | |
| 70 # Exclude .DEPS.git from triggering builds on chrome. | |
| 71 if path == 'src/.DEPS.git': | |
| 72 return None | |
| 73 | |
| 74 # List of projects we are interested in. The project names must exactly | |
| 75 # match paths in the Subversion repository, relative to the 'path' URL | |
| 76 # argument. build_utils.SplitPath() will use them as branch names to | |
| 77 # kick off the Schedulers for different projects. | |
| 78 projects = ['src'] | |
| 79 return build_utils.SplitPath(projects, path) | |
| 80 | |
| 81 # Polls config.Master.trunk_url for changes | |
| 82 chromium_rev = 'http://src.chromium.org/viewvc/chrome?view=rev&revision=%s' | |
| 83 trunk_poller = svnpoller.SVNPoller(svnurl=config.Master.trunk_url, | |
| 84 svnbin=chromium_utils.SVN_BIN, | |
| 85 split_file=ChromeTreeFileSplitter, | |
| 86 pollinterval=10, | |
| 87 revlinktmpl=chromium_rev) | |
| 88 | |
| 89 c['change_source'] = [trunk_poller] | |
| 90 | |
| 91 | |
| 92 ####### SCHEDULERS | |
| 93 | |
| 94 ## configure the Schedulers | |
| 95 | |
| 96 # Scheduler to trigger slaves that depend on the linux release build. | |
| 97 s_chromium_linux_rel_builder = Scheduler(name='chromium_linux_rel_builder', | |
| 98 branch='src', | |
| 99 treeStableTimer=60, | |
| 100 builderNames=['AV Linux Builder', | |
| 101 'AV Win7']) | |
| 102 | |
| 103 s_chromium_linux_rel_trigger = Triggerable('linuxrel', | |
| 104 ['AV Linux', | |
| 105 ]) | |
| 106 | |
| 107 c['schedulers'] = [s_chromium_linux_rel_builder, | |
| 108 s_chromium_linux_rel_trigger] | |
| 109 | |
| 110 ####### BUILDERS | |
| 111 | |
| 112 # buildbot/process/factory.py provides several BuildFactory classes you can | |
| 113 # start with, which implement build processes for common targets (GNU | |
| 114 # autoconf projects, CPAN perl modules, etc). The factory.BuildFactory is the | |
| 115 # base class, and is configured with a series of BuildSteps. When the build | |
| 116 # is run, the appropriate buildslave is told to execute each Step in turn. | |
| 117 | |
| 118 # the first BuildStep is typically responsible for obtaining a copy of the | |
| 119 # sources. There are source-obtaining Steps in buildbot/process/step.py for | |
| 120 # CVS, SVN, and others. | |
| 121 | |
| 122 builders = [] | |
| 123 | |
| 124 # ---------------------------------------------------------------------------- | |
| 125 # FACTORIES | |
| 126 | |
| 127 m_linux = chromium_factory.ChromiumFactory('src/out', 'linux2') | |
| 128 m_win = chromium_factory.ChromiumFactory('src/build', 'win32') | |
| 129 | |
| 130 # Some shortcut to simplify the code below. | |
| 131 F_LINUX = m_linux.ChromiumAVPerfFactory | |
| 132 F_WIN = m_win.ChromiumAVPerfFactory | |
| 133 | |
| 134 chromium_rel_linux_archive = master_config.GetArchiveUrl('ChromiumPerfAv', | |
| 135 'AV Linux Builder', | |
| 136 'chromium-rel-linux-builder', | |
| 137 'linux') | |
| 138 | |
| 139 # The identifier of the factory is the build configuration. If two factories | |
| 140 # are using the same build configuration, they should have the same identifier. | |
| 141 | |
| 142 # GYP DEFINES used to enable codecs available in chrome. | |
| 143 FFMPEG_GYP_DEFINES_LINUX = ( | |
| 144 'ffmpeg_branding=ChromeOS ' | |
| 145 'proprietary_codecs=1 ' | |
| 146 'python_ver=2.7 ' | |
| 147 ) | |
| 148 | |
| 149 FFMPEG_GYP_DEFINES_WIN = ( | |
| 150 'ffmpeg_branding=Chrome ' | |
| 151 'proprietary_codecs=1 ' | |
| 152 'fastbuild=1 ' | |
| 153 'component=shared_library ' | |
| 154 ) | |
| 155 | |
| 156 perf_av_tests = ['avperf'] | |
| 157 | |
| 158 f_cr_rel_linux_builder = F_LINUX(target='Release', | |
| 159 slave_type='Builder', | |
| 160 options=['--', 'chromium_builder_perf_av'], | |
| 161 factory_properties={ | |
| 162 'gclient_env': { | |
| 163 'GYP_DEFINES': FFMPEG_GYP_DEFINES_LINUX}, | |
| 164 'trigger': 'linuxrel'}) | |
| 165 | |
| 166 f_cr_rel_linux = F_LINUX(slave_type='Tester', | |
| 167 build_url=chromium_rel_linux_archive, | |
| 168 tests=perf_av_tests, | |
| 169 factory_properties={ | |
| 170 'show_perf_results': True, | |
| 171 'expectations': True, | |
| 172 'halt_on_missing_build': True, | |
| 173 'perf_id': 'linux-release', | |
| 174 'pyauto_env': { | |
| 175 'DO_NOT_RESTART_PYTHON_FOR_PYAUTO': '1' | |
| 176 }, | |
| 177 }) | |
| 178 | |
| 179 f_win7_rel = F_WIN(slave_type='BuilderTester', | |
| 180 project='all.sln;chromium_builder_perf_av', | |
| 181 target='Release', | |
| 182 tests=perf_av_tests, | |
| 183 factory_properties={ | |
| 184 'gclient_env': {'GYP_DEFINES': FFMPEG_GYP_DEFINES_WIN}, | |
| 185 'show_perf_results': True, | |
| 186 'expectations': True, | |
| 187 'perf_id': 'win-release'}) | |
| 188 | |
| 189 # ---------------------------------------------------------------------------- | |
| 190 # BUILDER DEFINITIONS | |
| 191 | |
| 192 # The 'builders' list defines the Builders. Each one is configured with a | |
| 193 # dictionary, using the following keys: | |
| 194 # name (required): the name used to describe this bilder | |
| 195 # builddir (required): which subdirectory to run the builder in | |
| 196 # factory (required): a BuildFactory to define how the build is run | |
| 197 # periodicBuildTime (optional): if set, force a build every N seconds | |
| 198 # category (optional): it is not used in the normal 'buildbot' meaning. It is | |
| 199 # used by gatekeeper to determine which steps it should | |
| 200 # look for to close the tree. | |
| 201 # | |
| 202 | |
| 203 b_chromium_rel_linux_builder = {'name': 'AV Linux Builder', | |
| 204 'builddir': 'chromium-rel-linux-builder', | |
| 205 'factory': f_cr_rel_linux_builder, | |
| 206 'category': '1linux|builders_compile|builder_testers', | |
| 207 'auto_reboot': False, | |
| 208 } | |
| 209 | |
| 210 b_chromium_rel_linux = {'name': 'AV Linux', | |
| 211 'builddir': 'chromium-rel-linux', | |
| 212 'factory': f_cr_rel_linux, | |
| 213 'category': '1linux|builders_compile|builder_testers', | |
| 214 } | |
| 215 | |
| 216 b_chromium_rel_win = {'name': 'AV Win7', | |
| 217 'factory': f_win7_rel, | |
| 218 'category': 'windows', | |
| 219 } | |
| 220 | |
| 221 c['builders'] = [ | |
| 222 b_chromium_rel_linux_builder, | |
| 223 b_chromium_rel_linux, | |
| 224 b_chromium_rel_win, | |
| 225 ] | |
| 226 | |
| 227 | |
| 228 ####### BUILDSLAVES | |
| 229 | |
| 230 # Associate the slaves to the manual builders. The configuration is in | |
| 231 # slaves.cfg. | |
| 232 for builder in c['builders']: | |
| 233 builder['slavenames'] = slaves.GetSlavesName(builder=builder['name']) | |
| 234 | |
| 235 # The 'slaves' list defines the set of allowable buildslaves. List all the | |
| 236 # slaves registered to a builder. Remove dupes. | |
| 237 c['slaves'] = master_utils.AutoSetupSlaves(c['builders'], | |
| 238 config.Master.GetBotPassword()) | |
| 239 master_utils.VerifySetup(c, slaves) | |
| 240 | |
| 241 | |
| 242 ####### STATUS TARGETS | |
| 243 | |
| 244 # The 'buildbotURL' string should point to the location where the buildbot's | |
| 245 # internal web server (usually the html.Waterfall page) is visible. This | |
| 246 # typically uses the port number set in the Waterfall 'status' entry, but | |
| 247 # with an externally-visible host name which the buildbot cannot figure out | |
| 248 # without some help. | |
| 249 | |
| 250 # Must come before AutoSetupMaster(). | |
| 251 c['buildbotURL'] = 'http://build.chromium.org/p/chromium.perf_av/' | |
| 252 | |
| 253 # Adds common status and tools to this master. | |
| 254 master_utils.AutoSetupMaster(c, ActiveMaster, | |
| 255 public_html="../master.chromium/public_html", | |
| 256 templates=['../master.chromium/templates'], | |
| 257 enable_http_status_push=ActiveMaster.is_production_host) | |
| 258 | |
| 259 # Add more. | |
| 260 | |
| 261 if PERF_NOTIFIER: | |
| 262 # Builder exclusions | |
| 263 c['status'].append(perf_count_notifier.PerfCountNotifier( | |
| 264 fromaddr=ActiveMaster.from_address, | |
| 265 relayhost=config.Master.smtp, | |
| 266 status_header='Perf results on "%(builder)s":\n', | |
| 267 subject='Buildbot %(result)s in %(projectName)s on %(builder)s, ' | |
| 268 'revision %(revision)s', | |
| 269 extraRecipients=['videostack-eng@google.com'], | |
| 270 lookup=master_utils.FilterDomain(), | |
| 271 use_getname=True, | |
| 272 # Perf steps to look for perf results. Other steps will be ignored. | |
| 273 step_names=['media_tests_av_perf'], | |
| 274 # 24 hours delay between emails perf bot result. | |
| 275 minimum_delay_between_alert=3600*24, | |
| 276 # A least 5 consecutive regressions are needed before notifying. | |
| 277 minimum_count=5, | |
| 278 # Combine bot results into one email. | |
| 279 combine_results=True)) | |
| 280 | |
| 281 ####### PROJECT IDENTITY | |
| 282 | |
| 283 # the 'projectName' string will be used to describe the project that this | |
| 284 # buildbot is working on. For example, it is used as the title of the | |
| 285 # waterfall HTML page. The 'projectURL' string will be used to provide a link | |
| 286 # from buildbot HTML pages to your project's home page. | |
| 287 | |
| 288 c['projectName'] = ActiveMaster.project_name | |
| 289 c['projectURL'] = config.Master.project_url | |
| OLD | NEW |