OLD | NEW |
(Empty) | |
| 1 # Copyright (c) 2011 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 #For buildbot 8, switch in this line |
| 7 #from buildbot.schedulers.basic import SingleBranchScheduler |
| 8 from buildbot.scheduler import Scheduler as SingleBranchScheduler |
| 9 |
| 10 # These modules come from scripts/master, which must be in the PYTHONPATH. |
| 11 from master import build_utils |
| 12 from master import chromium_notifier |
| 13 from master import master_config |
| 14 from master import master_utils |
| 15 from master import slaves_list |
| 16 |
| 17 from master.factory import chromeos_factory |
| 18 from master.factory import chromium_factory |
| 19 |
| 20 # These modules come from scripts/common, which must be in the PYTHONPATH. |
| 21 import config |
| 22 |
| 23 ActiveMaster = config.Master.ChromiumChromiumOS |
| 24 |
| 25 CODESEARCH_NOTIFIER = True |
| 26 STATUS_PUSH = False |
| 27 |
| 28 # These are the common targets to most of the builders |
| 29 # This is repeated in other linux master configs. |
| 30 linux_all_test_targets = [ |
| 31 'base_unittests', |
| 32 'crypto_unittests', |
| 33 'googleurl_unittests', |
| 34 'gpu_unittests', |
| 35 'media_unittests', |
| 36 'printing_unittests', |
| 37 'remoting_unittests', |
| 38 'net_unittests', |
| 39 'safe_browsing_tests', |
| 40 'cacheinvalidation_unittests', |
| 41 'jingle_unittests', |
| 42 'sql_unittests', # from test target unit |
| 43 'ipc_tests', # from test target unit |
| 44 'sync_unit_tests', # from test target unit |
| 45 'content_unittests', # from test target unit |
| 46 'unit_tests', # from test target unit |
| 47 'gfx_unittests', # from test target unit |
| 48 'browser_tests', |
| 49 'ui_tests', |
| 50 ] |
| 51 |
| 52 # This is the dictionary that the buildmaster pays attention to. We also use |
| 53 # a shorter alias to save typing. |
| 54 c = BuildmasterConfig = {} |
| 55 |
| 56 |
| 57 ####### CHANGESOURCES |
| 58 |
| 59 # the 'change_source' list tells the buildmaster how it should find out about |
| 60 # source code changes. Any class which implements IChangeSource can be added |
| 61 # to this list: there are several in buildbot/changes/*.py to choose from. |
| 62 def ChromeTreeFileSplitter(path): |
| 63 """split_file for the 'src' project in the trunk.""" |
| 64 |
| 65 # Exclude .DEPS.git from triggering builds on chrome. |
| 66 if path == 'src/.DEPS.git': |
| 67 return None |
| 68 |
| 69 # List of projects we are interested in. The project names must exactly |
| 70 # match paths in the Subversion repository, relative to the 'path' URL |
| 71 # argument. build_utils.SplitPath() will use them as branch names to |
| 72 # kick off the Schedulers for different projects. |
| 73 projects = ['src'] |
| 74 return build_utils.SplitPath(projects, path) |
| 75 |
| 76 # Rev link urls. |
| 77 chromium_rev = 'http://src.chromium.org/viewvc/chrome?view=rev&revision=%s' |
| 78 |
| 79 # Polls config.Master.trunk_url for changes |
| 80 trunk_poller = svnpoller.SVNPoller(svnurl=config.Master.trunk_url, |
| 81 split_file=ChromeTreeFileSplitter, |
| 82 pollinterval=10, |
| 83 revlinktmpl=chromium_rev) |
| 84 |
| 85 # TODO(petermayo) Make this sensitive to LKGM changes too, crosbug.com/20798 |
| 86 |
| 87 c['change_source'] = [trunk_poller] |
| 88 |
| 89 |
| 90 ####### SCHEDULERS |
| 91 |
| 92 ## configure the Schedulers |
| 93 |
| 94 # Main scheduler for all changes in trunk. |
| 95 s_chromium = SingleBranchScheduler( |
| 96 name='chromium', |
| 97 branch='src', |
| 98 treeStableTimer=60, |
| 99 builderNames=[ |
| 100 'Linux ChromeOS', |
| 101 'ChromiumOS (x86)', |
| 102 'ChromiumOS (arm)', |
| 103 'ChromiumOS (tegra2)']) |
| 104 |
| 105 c['schedulers'] = [s_chromium] |
| 106 |
| 107 ####### BUILDERS |
| 108 |
| 109 # buildbot/process/factory.py provides several BuildFactory classes you can |
| 110 # start with, which implement build processes for common targets (GNU |
| 111 # autoconf projects, CPAN perl modules, etc). The factory.BuildFactory is the |
| 112 # base class, and is configured with a series of BuildSteps. When the build |
| 113 # is run, the appropriate buildslave is told to execute each Step in turn. |
| 114 |
| 115 # the first BuildStep is typically responsible for obtaining a copy of the |
| 116 # sources. There are source-obtaining Steps in buildbot/process/step.py for |
| 117 # CVS, SVN, and others. |
| 118 |
| 119 builders = [] |
| 120 |
| 121 # ---------------------------------------------------------------------------- |
| 122 # FACTORIES |
| 123 |
| 124 |
| 125 f_chromium_linux_chromeos = chromium_factory.ChromiumFactory( |
| 126 'src/build', 'linux2').ChromiumOSFactory( |
| 127 tests=['unit', |
| 128 'base', |
| 129 'net', |
| 130 'googleurl', |
| 131 'media', |
| 132 'ui', |
| 133 'printing', |
| 134 'remoting', |
| 135 'browser_tests', |
| 136 'interactive_ui', |
| 137 'views', |
| 138 'crypto', |
| 139 'cacheinvalidation', |
| 140 'jingle'], |
| 141 options=['--compiler=goma'] + linux_all_test_targets + ['chromeos_builder'], |
| 142 factory_properties={ |
| 143 'archive_build': True, |
| 144 'extra_archive_paths': 'chrome/tools/build/chromeos', |
| 145 'gclient_env': { 'GYP_DEFINES':'chromeos=1 target_arch=ia32'}, |
| 146 'generate_gtest_json': True}) |
| 147 |
| 148 f_chromium_tot_chromeos_x86_generic = chromeos_factory.ChromeCbuildbotFactory( |
| 149 buildroot='/b/cbuild.x86', |
| 150 crostools_repo=None, |
| 151 pass_revision=True, |
| 152 params='x86-generic-tot-chrome-pfq-informational --debug').get_factory() |
| 153 |
| 154 f_chromium_tot_chromeos_arm_generic = chromeos_factory.ChromeCbuildbotFactory( |
| 155 buildroot='/b/cbuild.arm', |
| 156 crostools_repo=None, |
| 157 pass_revision=True, |
| 158 params='arm-generic-tot-chrome-pfq-informational --debug').get_factory() |
| 159 |
| 160 f_chromium_tot_chromeos_tegra2 = chromeos_factory.ChromeCbuildbotFactory( |
| 161 buildroot='/b/cbuild.tegra2', |
| 162 crostools_repo=None, |
| 163 pass_revision=True, |
| 164 params='arm-tegra2-tot-chrome-pfq-informational --debug').get_factory() |
| 165 |
| 166 |
| 167 |
| 168 # ---------------------------------------------------------------------------- |
| 169 # BUILDER DEFINITIONS |
| 170 |
| 171 # The 'builders' list defines the Builders. Each one is configured with a |
| 172 # dictionary, using the following keys: |
| 173 # name (required): the name used to describe this bilder |
| 174 # slavename (required): which slave to use, must appear in c['slaves'] |
| 175 # builddir (optional): which subdirectory to run the builder in |
| 176 # factory (required): a BuildFactory to define how the build is run |
| 177 # periodicBuildTime (optional): if set, force a build every N seconds |
| 178 # category (optional): it is not used in the normal 'buildbot' meaning. It is |
| 179 # used by gatekeeper to determine which steps it should |
| 180 # look for to close the tree. |
| 181 # |
| 182 |
| 183 b_chromium_rel_linux_touch = { |
| 184 'name': 'Linux ChromeOS', |
| 185 'builddir': 'chromium-rel-linux-chromeos', |
| 186 'factory': f_chromium_linux_chromeos, |
| 187 'category': 'linux', |
| 188 } |
| 189 |
| 190 b_chromium_tot_chromeos_x86_generic = { |
| 191 'name': 'ChromiumOS (x86)', |
| 192 'builddir': 'chromium-tot-chromeos-x86-generic', |
| 193 'factory': f_chromium_tot_chromeos_x86_generic, |
| 194 'category': 'chromiumos', |
| 195 } |
| 196 |
| 197 b_chromium_tot_chromeos_arm_generic = { |
| 198 'name': 'ChromiumOS (arm)', |
| 199 'builddir': 'chromium-tot-chromeos-arm-generic', |
| 200 'factory': f_chromium_tot_chromeos_arm_generic, |
| 201 'category': 'chromiumos', |
| 202 } |
| 203 |
| 204 b_chromium_tot_chromeos_tegra2 = { |
| 205 'name': 'ChromiumOS (tegra2)', |
| 206 'builddir': 'chromium-tot-chromeos-tegra2', |
| 207 'factory': f_chromium_tot_chromeos_tegra2, |
| 208 'category': 'chromiumos', |
| 209 } |
| 210 |
| 211 c['builders'] = [ |
| 212 b_chromium_rel_linux_touch, |
| 213 b_chromium_tot_chromeos_x86_generic, |
| 214 b_chromium_tot_chromeos_arm_generic, |
| 215 b_chromium_tot_chromeos_tegra2, |
| 216 ] |
| 217 |
| 218 # Associate the slaves to the manual builders. The configuration is in |
| 219 # slaves.cfg. |
| 220 slaves = slaves_list.SlavesList('slaves.cfg', ActiveMaster.project_name) |
| 221 for builder in c['builders']: |
| 222 builder['slavenames'] = slaves.GetSlavesName(builder=builder['name']) |
| 223 |
| 224 |
| 225 ####### BUILDSLAVES |
| 226 |
| 227 # The 'slaves' list defines the set of allowable buildslaves. List all the |
| 228 # slaves registered to a builder. Remove dupes. |
| 229 c['slaves'] = master_utils.AutoSetupSlaves(c['builders'], |
| 230 config.Master.GetBotPassword()) |
| 231 |
| 232 # Make sure everything works together. |
| 233 master_utils.VerifySetup(c, slaves) |
| 234 |
| 235 |
| 236 ####### STATUS TARGETS |
| 237 |
| 238 # Adds common status and tools to this master. |
| 239 master_utils.AutoSetupMaster(c, ActiveMaster, |
| 240 public_html="../master.chromium/public_html", |
| 241 enable_http_status_push=ActiveMaster.is_production_host) |
| 242 |
| 243 ####### PROJECT IDENTITY |
| 244 |
| 245 # Buildbot master url: |
| 246 c['buildbotURL'] = 'http://build.chromium.org/p/chromium.chromiumos/' |
OLD | NEW |