| OLD | NEW |
| 1 # -*- python -*- | 1 # -*- python -*- |
| 2 # ex: set syntax=python: | 2 # ex: set syntax=python: |
| 3 | 3 |
| 4 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 4 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 5 # Use of this source code is governed by a BSD-style license that can be | 5 # Use of this source code is governed by a BSD-style license that can be |
| 6 # found in the LICENSE file. | 6 # found in the LICENSE file. |
| 7 | 7 |
| 8 # This is the buildmaster config file for the 'nacl' bot. It must | 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 | 9 # be installed as 'master.cfg' in your buildmaster's base directory |
| 10 # (although the filename can be changed with the --basedir option to | 10 # (although the filename can be changed with the --basedir option to |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 builds = [] | 61 builds = [] |
| 62 build = self.getHeadBuild(builder) | 62 build = self.getHeadBuild(builder) |
| 63 number = 0 | 63 number = 0 |
| 64 while build and number < numBuilds: | 64 while build and number < numBuilds: |
| 65 debugInfo["builds_scanned"] += 1 | 65 debugInfo["builds_scanned"] += 1 |
| 66 number += 1 | 66 number += 1 |
| 67 | 67 |
| 68 # CHANGED WAS HERE: | 68 # CHANGED WAS HERE: |
| 69 # Dropped got_revision as a source for got_rev. | 69 # Dropped got_revision as a source for got_rev. |
| 70 got_rev = -1 |
| 70 | 71 |
| 71 # Get the last revision in this build. | 72 # Get the last revision in this build. |
| 72 got_rev = -1 | 73 try: |
| 74 if got_rev == -1: |
| 75 got_rev = build.getProperty("trigger_by_revision") |
| 76 if not self.comparator.isValidRevision(got_rev): |
| 77 got_rev = -1 |
| 78 except: |
| 79 pass |
| 73 try: | 80 try: |
| 74 if got_rev == -1: | 81 if got_rev == -1: |
| 75 got_rev = build.getProperty("revision") | 82 got_rev = build.getProperty("revision") |
| 76 if not self.comparator.isValidRevision(got_rev): | 83 if not self.comparator.isValidRevision(got_rev): |
| 77 got_rev = -1 | 84 got_rev = -1 |
| 78 except: | 85 except: |
| 79 pass | 86 pass |
| 80 | 87 |
| 81 # We ignore all builds that don't have last revisions. | 88 # We ignore all builds that don't have last revisions. |
| 82 # TODO(nsylvain): If the build is over, maybe it was a problem | 89 # TODO(nsylvain): If the build is over, maybe it was a problem |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 | 227 |
| 221 ####### CHANGESOURCES | 228 ####### CHANGESOURCES |
| 222 | 229 |
| 223 # the 'change_source' list tells the buildmaster how it should find out about | 230 # the 'change_source' list tells the buildmaster how it should find out about |
| 224 # source code changes. Any class which implements IChangeSource can be added | 231 # source code changes. Any class which implements IChangeSource can be added |
| 225 # to this list: there are several in buildbot/changes/*.py to choose from. | 232 # to this list: there are several in buildbot/changes/*.py to choose from. |
| 226 def NativeClientTreeFileSplitter(path): | 233 def NativeClientTreeFileSplitter(path): |
| 227 return ('llvm', path) | 234 return ('llvm', path) |
| 228 | 235 |
| 229 | 236 |
| 230 llvm_poller = svnpoller.SVNPoller( | 237 c['change_source'] = [] |
| 231 svnurl='http://llvm.org/svn/llvm-project/llvm/trunk', | |
| 232 split_file=NativeClientTreeFileSplitter, | |
| 233 revlinktmpl=( | |
| 234 'http://llvm.org/viewvc/llvm-project?view=rev&revision=%s'), | |
| 235 pollinterval=10) | |
| 236 | 238 |
| 237 llvm_gcc_poller = svnpoller.SVNPoller( | 239 for repo in [ |
| 238 svnurl='http://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk', | 240 'llvm', |
| 239 split_file=NativeClientTreeFileSplitter, | 241 'cfe', |
| 240 revlinktmpl=( | 242 'dragonegg', |
| 241 'http://llvm.org/viewvc/llvm-project?view=rev&revision=%s'), | 243 'llvm-gcc-4.2', |
| 242 pollinterval=10) | 244 ]: |
| 243 | 245 poller = svnpoller.SVNPoller( |
| 244 c['change_source'] = [llvm_poller, llvm_gcc_poller] | 246 svnurl='http://llvm.org/svn/llvm-project/%s/trunk' % repo, |
| 247 split_file=NativeClientTreeFileSplitter, |
| 248 revlinktmpl='http://llvm.org/viewvc/llvm-project?view=rev&revision=%s', |
| 249 pollinterval=10) |
| 250 c['change_source'].append(poller) |
| 245 | 251 |
| 246 | 252 |
| 247 ####### BUILDERS | 253 ####### BUILDERS |
| 248 | 254 |
| 249 # buildbot/process/factory.py provides several BuildFactory classes you can | 255 # buildbot/process/factory.py provides several BuildFactory classes you can |
| 250 # start with, which implement build processes for common targets (GNU | 256 # start with, which implement build processes for common targets (GNU |
| 251 # autoconf projects, CPAN perl modules, etc). The factory.BuildFactory is the | 257 # autoconf projects, CPAN perl modules, etc). The factory.BuildFactory is the |
| 252 # base class, and is configured with a series of BuildSteps. When the build | 258 # base class, and is configured with a series of BuildSteps. When the build |
| 253 # is run, the appropriate buildslave is told to execute each Step in turn. | 259 # is run, the appropriate buildslave is told to execute each Step in turn. |
| 254 | 260 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 268 # Some shortcut to simplify the code below. | 274 # Some shortcut to simplify the code below. |
| 269 F_LINUX = m_linux.NativeClientFactory | 275 F_LINUX = m_linux.NativeClientFactory |
| 270 | 276 |
| 271 | 277 |
| 272 # The identifier of the factory is the build configuration. If two factories | 278 # The identifier of the factory is the build configuration. If two factories |
| 273 # are using the same build configuration, they should have the same identifier. | 279 # are using the same build configuration, they should have the same identifier. |
| 274 | 280 |
| 275 factories = [] | 281 factories = [] |
| 276 | 282 |
| 277 # Linux | 283 # Linux |
| 278 factories.append(['llvm', '1llvm', F_LINUX( | 284 factories.append(['llvm', '1llvm', F_LINUX()]) |
| 279 tests=['nacl_trigger_llvm'])]) | |
| 280 factories.append(['llvm-scons', '1llvm', F_LINUX()]) | |
| 281 factories.append(['llvm-spec2k-x86', '1llvm', F_LINUX()]) | |
| 282 factories.append(['llvm-spec2k-arm', '1llvm', F_LINUX()]) | |
| 283 | 285 |
| 284 | 286 |
| 285 ####### SCHEDULERS | 287 ####### SCHEDULERS |
| 286 ## configure the Schedulers | 288 ## configure the Schedulers |
| 287 # Main scheduler for all changes in trunk. | 289 # Main scheduler for all changes in trunk. |
| 288 primary_builders = [] | 290 primary_builders = [] |
| 289 for f in factories: | 291 for f in factories: |
| 290 primary_builders.append(f[0]) | 292 primary_builders.append(f[0]) |
| 291 s_nacl = Scheduler( | 293 s_nacl = Scheduler( |
| 292 name='nacl', | 294 name='nacl', |
| 293 branch='llvm', | 295 branch='llvm', |
| 294 treeStableTimer=0, | 296 treeStableTimer=0, |
| 295 builderNames=['llvm'], | 297 builderNames=['llvm'], |
| 296 ) | 298 ) |
| 297 | 299 |
| 298 s_llvm_trigger = Triggerable( | |
| 299 name='llvm_trigger', | |
| 300 builderNames=[ | |
| 301 'llvm-scons', | |
| 302 'llvm-spec2k-x86', | |
| 303 'llvm-spec2k-arm', | |
| 304 ]) | |
| 305 | |
| 306 c['schedulers'] = [ | 300 c['schedulers'] = [ |
| 307 s_nacl, | 301 s_nacl, |
| 308 s_llvm_trigger, | |
| 309 ] | 302 ] |
| 310 | 303 |
| 311 | 304 |
| 312 # Build each change separately. | |
| 313 def mergeRequests(builder, req1, req2): | |
| 314 return False | |
| 315 c['mergeRequests'] = mergeRequests | |
| 316 | |
| 317 | 305 |
| 318 # Setup a per slave lock to prevent more than one thing running at once on | 306 # Setup a per slave lock to prevent more than one thing running at once on |
| 319 # a single slave. | 307 # a single slave. |
| 320 slave_lock = locks.SlaveLock('overload_lock', maxCount=1) | 308 slave_lock = locks.SlaveLock('overload_lock', maxCount=1) |
| 321 | 309 |
| 322 | 310 |
| 323 | 311 |
| 324 # ---------------------------------------------------------------------------- | 312 # ---------------------------------------------------------------------------- |
| 325 # BUILDER DEFINITIONS | 313 # BUILDER DEFINITIONS |
| 326 | 314 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 c['projectName'] = ActiveMaster.project_name | 406 c['projectName'] = ActiveMaster.project_name |
| 419 c['projectURL'] = config.Master.project_url | 407 c['projectURL'] = config.Master.project_url |
| 420 | 408 |
| 421 # the 'buildbotURL' string should point to the location where the buildbot's | 409 # the 'buildbotURL' string should point to the location where the buildbot's |
| 422 # internal web server (usually the html.Waterfall page) is visible. This | 410 # internal web server (usually the html.Waterfall page) is visible. This |
| 423 # typically uses the port number set in the Waterfall 'status' entry, but | 411 # typically uses the port number set in the Waterfall 'status' entry, but |
| 424 # with an externally-visible host name which the buildbot cannot figure out | 412 # with an externally-visible host name which the buildbot cannot figure out |
| 425 # without some help. | 413 # without some help. |
| 426 | 414 |
| 427 c['buildbotURL'] = 'http://build.chromium.org/p/client.nacl.llvm/' | 415 c['buildbotURL'] = 'http://build.chromium.org/p/client.nacl.llvm/' |
| OLD | NEW |