| OLD | NEW |
| (Empty) |
| 1 # -*- python -*- | |
| 2 # ex: set syntax=python: | |
| 3 | |
| 4 # Copyright (c) 2006-2008 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 'nacl' 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_nacl_[dbg/opt/sdk]_[os] | |
| 19 # Builders: b_nacl_[dbg/opt/sdk]_[os] | |
| 20 # BuildDir: [dbg/opt/sdk]-[os] | |
| 21 # | |
| 22 # os = xp/linux/mac | |
| 23 | |
| 24 from buildbot import locks | |
| 25 from buildbot.changes import svnpoller | |
| 26 from buildbot.scheduler import Dependent | |
| 27 from buildbot.scheduler import Scheduler | |
| 28 from buildbot.scheduler import Triggerable | |
| 29 | |
| 30 # Reload all the python files under master and common | |
| 31 import master | |
| 32 reload(master) | |
| 33 import common | |
| 34 reload(common) | |
| 35 | |
| 36 # These modules come from scripts/master, which must be in the PYTHONPATH. | |
| 37 import build_utils | |
| 38 import chromium_step | |
| 39 import master_utils | |
| 40 from master.factory import nacl_factory | |
| 41 from master.factory import chromium_factory | |
| 42 import slaves_list | |
| 43 | |
| 44 # These modules come from scripts/common, which must be in the PYTHONPATH. | |
| 45 import chromium_config as config | |
| 46 import chromium_utils | |
| 47 | |
| 48 ActiveMaster = config.Master.NativeClientChrome | |
| 49 | |
| 50 TREE_GATE_KEEPER = ActiveMaster.is_production_host | |
| 51 GOOD_REVISIONS = False | |
| 52 | |
| 53 # This is the dictionary that the buildmaster pays attention to. We also use | |
| 54 # a shorter alias to save typing. | |
| 55 c = BuildmasterConfig = {} | |
| 56 | |
| 57 | |
| 58 ####### CHANGESOURCES | |
| 59 | |
| 60 # the 'change_source' list tells the buildmaster how it should find out about | |
| 61 # source code changes. Any class which implements IChangeSource can be added | |
| 62 # to this list: there are several in buildbot/changes/*.py to choose from. | |
| 63 def NativeClientTreeFileSplitter(path): | |
| 64 projects = ['native_client'] | |
| 65 for p in projects: | |
| 66 if path.startswith(p + '/'): | |
| 67 return (p, path[len(p)+1:]) | |
| 68 return None | |
| 69 | |
| 70 # Polls config.Master.nacl_trunk_url for changes | |
| 71 trunk_poller = svnpoller.SVNPoller( | |
| 72 svnurl=config.Master.nacl_trunk_url + '/src', | |
| 73 split_file=NativeClientTreeFileSplitter, | |
| 74 pollinterval=10) | |
| 75 | |
| 76 c['change_source'] = [trunk_poller] | |
| 77 | |
| 78 | |
| 79 ####### BUILDERS | |
| 80 | |
| 81 # buildbot/process/factory.py provides several BuildFactory classes you can | |
| 82 # start with, which implement build processes for common targets (GNU | |
| 83 # autoconf projects, CPAN perl modules, etc). The factory.BuildFactory is the | |
| 84 # base class, and is configured with a series of BuildSteps. When the build | |
| 85 # is run, the appropriate buildslave is told to execute each Step in turn. | |
| 86 | |
| 87 # the first BuildStep is typically responsible for obtaining a copy of the | |
| 88 # sources. There are source-obtaining Steps in buildbot/process/step.py for | |
| 89 # CVS, SVN, and others. | |
| 90 | |
| 91 | |
| 92 # ---------------------------------------------------------------------------- | |
| 93 # FACTORIES | |
| 94 | |
| 95 m_win_ch = chromium_factory.ChromiumFactory('src/build', 'win32') | |
| 96 m_linux_ch = chromium_factory.ChromiumFactory('src/build', 'linux2') | |
| 97 m_mac_ch = chromium_factory.ChromiumFactory('src/build', 'darwin') | |
| 98 | |
| 99 # Some shortcut to simplify the code below. | |
| 100 F_WIN_CH = m_win_ch.ChromiumNativeClientLatestFactory | |
| 101 F_LINUX_CH = m_linux_ch.ChromiumNativeClientLatestFactory | |
| 102 F_MAC_CH = m_mac_ch.ChromiumNativeClientLatestFactory | |
| 103 | |
| 104 | |
| 105 # The identifier of the factory is the build configuration. If two factories | |
| 106 # are using the same build configuration, they should have the same identifier. | |
| 107 | |
| 108 # BuilderTesters using a custom build configuration. | |
| 109 factories = [] | |
| 110 | |
| 111 # Add Chromium integration factories. | |
| 112 factories.append(['xp-nacl-chrome', '1Integration|info', F_WIN_CH( | |
| 113 'xp-nacl-chrome', | |
| 114 mode='google_chrome', | |
| 115 project='all.sln', | |
| 116 clobber=True, | |
| 117 compile_timeout=2400, | |
| 118 tests=['unit', 'browser_tests', 'check_bins', 'nacl_ui'], | |
| 119 factory_properties={'disable_mini_installer_test': True}) | |
| 120 ]) | |
| 121 factories.append(['mac-nacl-chrome', '1Integration|info', F_MAC_CH( | |
| 122 'mac-nacl-chrome', | |
| 123 mode='google_chrome', | |
| 124 clobber=True, | |
| 125 compile_timeout=2400, | |
| 126 tests=['unit', 'ui', 'media', 'printing', | |
| 127 'browser_tests', 'googleurl', 'nacl_ui'], | |
| 128 factory_properties={}) | |
| 129 ]) | |
| 130 factories.append(['hardy64-nacl-chrome', '1Integration|info', F_LINUX_CH( | |
| 131 'hardy64-nacl-chrome', | |
| 132 mode='google_chrome', | |
| 133 clobber=True, | |
| 134 compile_timeout=72000, | |
| 135 tests=['unit', 'ui', 'googleurl', 'media', 'printing', | |
| 136 'sizes', 'test_shell', 'memory', 'browser_tests', 'startup', | |
| 137 'page_cycler', 'page_cycler_http', 'webkit_unit', 'nacl_ui'], | |
| 138 options=['--build-tool=make', 'all'], | |
| 139 factory_properties={ | |
| 140 'gclient_env': {'GYP_GENERATORS' : 'make'}}) | |
| 141 ]) | |
| 142 | |
| 143 | |
| 144 | |
| 145 ####### SCHEDULERS | |
| 146 ## configure the Schedulers | |
| 147 # Main scheduler for all changes in trunk. | |
| 148 primary_builders = [] | |
| 149 for f in factories: | |
| 150 primary_builders.append(f[0]) | |
| 151 s_nacl = Scheduler( | |
| 152 name='nacl', | |
| 153 branch='native_client', | |
| 154 treeStableTimer=60, | |
| 155 builderNames=primary_builders, | |
| 156 ) | |
| 157 c['schedulers'] = [ | |
| 158 s_nacl, | |
| 159 ] | |
| 160 | |
| 161 | |
| 162 # ---------------------------------------------------------------------------- | |
| 163 # BUILDER DEFINITIONS | |
| 164 | |
| 165 # The 'builders' list defines the Builders. Each one is configured with a | |
| 166 # dictionary, using the following keys: | |
| 167 # name (required): the name used to describe this bilder | |
| 168 # slavename (required): which slave to use, must appear in c['slaves'] | |
| 169 # builddir (required): which subdirectory to run the builder in | |
| 170 # factory (required): a BuildFactory to define how the build is run | |
| 171 # periodicBuildTime (optional): if set, force a build every N seconds | |
| 172 # category (optional): it is not used in the normal 'buildbot' meaning. It is | |
| 173 # used by gatekeeper to determine which steps it should | |
| 174 # look for to close the tree. | |
| 175 # | |
| 176 | |
| 177 c['builders'] = [] | |
| 178 slaves = slaves_list.SlavesList('slaves.cfg', 'NativeClientChrome') | |
| 179 for f in factories: | |
| 180 c['builders'].append({ | |
| 181 'name': f[0], | |
| 182 'slavenames': slaves.GetSlavesName(builder=f[0]), | |
| 183 'builddir': f[0], | |
| 184 'factory': f[2], | |
| 185 'category': '%s' % f[1], | |
| 186 # Don't enable auto_reboot for people testing locally. | |
| 187 'auto_reboot': ActiveMaster.is_production_host, | |
| 188 }) | |
| 189 if f[0] == 'xp-m32-n32-sdk': | |
| 190 c['builders'][-1]['max_builds'] = 2 | |
| 191 | |
| 192 | |
| 193 ####### BUILDSLAVES | |
| 194 | |
| 195 # The 'slaves' list defines the set of allowable buildslaves. List all the | |
| 196 # slaves registered to a builder. Remove dupes. | |
| 197 c['slaves'] = master_utils.AutoSetupSlaves(c['builders'], | |
| 198 config.Master.GetBotPassword()) | |
| 199 | |
| 200 # Make sure everything works together. | |
| 201 master_utils.VerifySetup(c, slaves) | |
| 202 | |
| 203 | |
| 204 ####### STATUS TARGETS | |
| 205 | |
| 206 # Adds common status and tools to this master. | |
| 207 master_utils.AutoSetupMaster(c, ActiveMaster) | |
| 208 | |
| 209 # Add more. | |
| 210 | |
| 211 if TREE_GATE_KEEPER: | |
| 212 import gatekeeper | |
| 213 # This is the list of the builder categories and the corresponding critical | |
| 214 # steps. If one critical step fails, gatekeeper will close the tree | |
| 215 # automatically. | |
| 216 categories_steps = { | |
| 217 '': [ | |
| 218 'update scripts', 'update', | |
| 219 'clobber', 'clobber_packages', | |
| 220 ], | |
| 221 'info': [], | |
| 222 'closer': [ | |
| 223 'update scripts', 'update', | |
| 224 'clobber', 'clobber_packages', 'precompile', 'compile', | |
| 225 'scons_compile', 'gyp_compile', 'build_packages', | |
| 226 'cooking_tarball', 'selenium', | |
| 227 'small_tests', 'medium_tests', 'large_tests', | |
| 228 'hand_tests', 'smoke_tests', | |
| 229 'backup_plugin', 'install_plugin', 'start_vncserver', | |
| 230 'stop_vncserver', 'restore_plugin'], | |
| 231 } | |
| 232 exclusions = { } | |
| 233 forgiving_steps = ['update scripts', 'update', 'svnkill', 'taskkill', | |
| 234 'archived build'] | |
| 235 c['status'].append(gatekeeper.GateKeeper( | |
| 236 fromaddr=ActiveMaster.from_address, | |
| 237 categories_steps=categories_steps, | |
| 238 exclusions=exclusions, | |
| 239 relayhost=config.Master.smtp, | |
| 240 subject='buildbot %(result)s in %(projectName)s on %(builder)s, ' | |
| 241 'revision %(revision)s', | |
| 242 extraRecipients=ActiveMaster.tree_closing_notification_recipients, | |
| 243 tree_status_url=ActiveMaster.tree_status_url, | |
| 244 lookup=master_utils.FilterDomain(), | |
| 245 forgiving_steps=forgiving_steps)) | |
| 246 | |
| 247 if GOOD_REVISIONS: | |
| 248 import goodrevisions | |
| 249 # This is the list of builders with their respective list of critical steps | |
| 250 # that all need to succeed to mark a revision as successful. A single failure | |
| 251 # in any of the steps of any of the builders will mark the revision as failed. | |
| 252 all_steps = [ | |
| 253 'update', | |
| 254 'compile', | |
| 255 'small_tests', | |
| 256 'medium_tests', | |
| 257 'large_tests', | |
| 258 ] | |
| 259 c['status'].append(goodrevisions.GoodRevisions( | |
| 260 good_revision_steps={'': all_steps}, | |
| 261 store_revisions_url=ActiveMaster.store_revisions_url)) | |
| 262 | |
| 263 | |
| 264 ####### PROJECT IDENTITY | |
| 265 | |
| 266 # Buildbot master url: | |
| 267 c['buildbotURL'] = 'http://buildbot.jail.google.com/buildbot/nacl/' | |
| OLD | NEW |