| [email protected] | 4dc496d | 2012-01-04 21:07:37 | [diff] [blame] | 1 | # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| [email protected] | 7d4b3e8 | 2010-12-22 02:43:30 | [diff] [blame] | 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | """Define the supported projects.""" |
| 5 | |
| [email protected] | 624180d | 2012-04-20 18:00:14 | [diff] [blame] | 6 | import json |
| [email protected] | ba0cc0e | 2011-08-23 17:57:55 | [diff] [blame] | 7 | import logging |
| [email protected] | 7d4b3e8 | 2010-12-22 02:43:30 | [diff] [blame] | 8 | import os |
| 9 | import re |
| 10 | import sys |
| [email protected] | de06350 | 2011-06-14 20:17:09 | [diff] [blame] | 11 | import urllib2 |
| [email protected] | 7d4b3e8 | 2010-12-22 02:43:30 | [diff] [blame] | 12 | |
| [email protected] | a3e4563 | 2011-04-21 01:55:48 | [diff] [blame] | 13 | import find_depot_tools # pylint: disable=W0611 |
| [email protected] | 7d4b3e8 | 2010-12-22 02:43:30 | [diff] [blame] | 14 | import checkout |
| [email protected] | a3e4563 | 2011-04-21 01:55:48 | [diff] [blame] | 15 | |
| [email protected] | 03878dc | 2011-07-29 15:53:22 | [diff] [blame] | 16 | import async_push |
| [email protected] | 5dba4db | 2011-07-25 22:42:55 | [diff] [blame] | 17 | import context |
| [email protected] | 68fa02b | 2011-04-12 21:03:57 | [diff] [blame] | 18 | import errors |
| [email protected] | 7d4b3e8 | 2010-12-22 02:43:30 | [diff] [blame] | 19 | import pending_manager |
| [email protected] | d91910e | 2013-05-16 14:26:08 | [diff] [blame] | 20 | from post_processors import chromium_copyright |
| [email protected] | 7d4b3e8 | 2010-12-22 02:43:30 | [diff] [blame] | 21 | from verification import presubmit_check |
| [email protected] | bfa5ce8 | 2011-01-11 21:47:40 | [diff] [blame] | 22 | from verification import project_base |
| [email protected] | 90b0345 | 2011-01-10 20:34:20 | [diff] [blame] | 23 | from verification import reviewer_lgtm |
| [email protected] | c799161 | 2011-01-18 22:04:09 | [diff] [blame] | 24 | from verification import tree_status |
| [email protected] | 08d4ba9 | 2014-01-10 17:21:16 | [diff] [blame] | 25 | from verification import trigger_experimental_try_job |
| [email protected] | 9f31761 | 2013-02-05 21:30:49 | [diff] [blame] | 26 | from verification import try_job_steps |
| [email protected] | 3ef39fe | 2012-09-11 12:20:34 | [diff] [blame] | 27 | from verification import try_job_on_rietveld |
| [email protected] | 54c0005 | 2013-02-01 23:22:37 | [diff] [blame] | 28 | from verification import try_server |
| 29 | |
| [email protected] | 7d4b3e8 | 2010-12-22 02:43:30 | [diff] [blame] | 30 | |
| [email protected] | 95477b7 | 2011-12-06 16:01:35 | [diff] [blame] | 31 | ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) |
| [email protected] | 8eeff6b | 2013-10-10 23:21:50 | [diff] [blame] | 32 | INTERNAL_DIR = os.path.abspath( |
| 33 | os.path.join(ROOT_DIR, os.pardir, 'commit-queue-internal')) |
| [email protected] | 95477b7 | 2011-12-06 16:01:35 | [diff] [blame] | 34 | |
| 35 | # These come from commit-queue in the internal repo. |
| [email protected] | 8eeff6b | 2013-10-10 23:21:50 | [diff] [blame] | 36 | if os.path.isdir(INTERNAL_DIR): |
| 37 | sys.path.insert(0, INTERNAL_DIR) |
| [email protected] | 95477b7 | 2011-12-06 16:01:35 | [diff] [blame] | 38 | import chromium_committers # pylint: disable=F0401 |
| [email protected] | 4dc496d | 2012-01-04 21:07:37 | [diff] [blame] | 39 | import gyp_committers # pylint: disable=F0401 |
| [email protected] | 95477b7 | 2011-12-06 16:01:35 | [diff] [blame] | 40 | import nacl_committers # pylint: disable=F0401 |
| [email protected] | e4bc2d6 | 2013-02-20 12:52:09 | [diff] [blame] | 41 | import skia_committers # pylint: disable=F0401 |
| [email protected] | 8eeff6b | 2013-10-10 23:21:50 | [diff] [blame] | 42 | else: |
| [email protected] | 95477b7 | 2011-12-06 16:01:35 | [diff] [blame] | 43 | print >> sys.stderr, ( |
| [email protected] | 8eeff6b | 2013-10-10 23:21:50 | [diff] [blame] | 44 | 'Failed to find commit-queue-internal; will fail to start!') |
| [email protected] | 95477b7 | 2011-12-06 16:01:35 | [diff] [blame] | 45 | chromium_committers = None |
| [email protected] | 4dc496d | 2012-01-04 21:07:37 | [diff] [blame] | 46 | gyp_committers = None |
| [email protected] | 95477b7 | 2011-12-06 16:01:35 | [diff] [blame] | 47 | nacl_committers = None |
| [email protected] | e4bc2d6 | 2013-02-20 12:52:09 | [diff] [blame] | 48 | skia_committers = None |
| [email protected] | 1ee1dd0 | 2014-01-28 18:23:28 | [diff] [blame^] | 49 | |
| [email protected] | 4f4997d | 2012-03-09 02:11:50 | [diff] [blame] | 50 | |
| [email protected] | bdc32c6 | 2011-02-24 01:56:45 | [diff] [blame] | 51 | # It's tricky here because 'chrome' is remapped to 'svn' on src.chromium.org but |
| 52 | # the other repositories keep their repository name. So don't list it here. |
| 53 | SVN_HOST_ALIASES = [ |
| 54 | 'svn://svn.chromium.org', |
| 55 | 'svn://chrome-svn', |
| 56 | 'svn://chrome-svn.corp', |
| 57 | 'svn://chrome-svn.corp.google.com' |
| 58 | ] |
| 59 | |
| 60 | CHROME_SVN_BASES = [item + '/chrome' for item in SVN_HOST_ALIASES] + [ |
| [email protected] | dadef19 | 2011-01-18 01:04:49 | [diff] [blame] | 61 | 'http://src.chromium.org/svn', |
| [email protected] | a129cf1 | 2011-05-16 19:30:21 | [diff] [blame] | 62 | 'https://src.chromium.org/svn', |
| [email protected] | 5266e1f | 2012-05-17 20:12:22 | [diff] [blame] | 63 | 'http://src.chromium.org/chrome', |
| 64 | 'https://src.chromium.org/chrome', |
| [email protected] | bdc32c6 | 2011-02-24 01:56:45 | [diff] [blame] | 65 | ] |
| 66 | |
| [email protected] | 666cf56 | 2013-04-09 03:53:51 | [diff] [blame] | 67 | BLINK_SVN_BASES = [item + '/blink' for item in SVN_HOST_ALIASES] + [ |
| 68 | 'http://src.chromium.org/blink', |
| 69 | 'https://src.chromium.org/blink', |
| 70 | ] |
| 71 | |
| [email protected] | e1415ab | 2012-07-16 13:54:20 | [diff] [blame] | 72 | # Steps that are never considered to determine the try job success. |
| [email protected] | 4f4997d | 2012-03-09 02:11:50 | [diff] [blame] | 73 | IGNORED_STEPS = ( |
| 74 | 'svnkill', 'update_scripts', 'taskkill', 'cleanup_temp', 'process_dumps') |
| 75 | |
| [email protected] | e1415ab | 2012-07-16 13:54:20 | [diff] [blame] | 76 | # To be used in a regexp to match the branch part of an git url. |
| [email protected] | 1ab44ce | 2013-03-07 15:28:50 | [diff] [blame] | 77 | BRANCH_MATCH = r'\@[a-zA-Z0-9\-_\.]+' |
| [email protected] | e1415ab | 2012-07-16 13:54:20 | [diff] [blame] | 78 | |
| [email protected] | 7d4b3e8 | 2010-12-22 02:43:30 | [diff] [blame] | 79 | |
| [email protected] | 4acc60a | 2011-08-22 19:48:23 | [diff] [blame] | 80 | def _read_lines(filepath, what): |
| [email protected] | 68fa02b | 2011-04-12 21:03:57 | [diff] [blame] | 81 | try: |
| [email protected] | 4acc60a | 2011-08-22 19:48:23 | [diff] [blame] | 82 | return open(filepath).readlines() |
| [email protected] | 68fa02b | 2011-04-12 21:03:57 | [diff] [blame] | 83 | except IOError: |
| [email protected] | 4acc60a | 2011-08-22 19:48:23 | [diff] [blame] | 84 | raise errors.ConfigurationError('Put the %s in %s' % (what, filepath)) |
| 85 | |
| 86 | |
| [email protected] | 95477b7 | 2011-12-06 16:01:35 | [diff] [blame] | 87 | def _get_chromium_committers(): |
| [email protected] | 4acc60a | 2011-08-22 19:48:23 | [diff] [blame] | 88 | """Gets the list of all allowed committers.""" |
| [email protected] | 95477b7 | 2011-12-06 16:01:35 | [diff] [blame] | 89 | if not chromium_committers: |
| 90 | # Fake values. |
| 91 | entries = ['georges'] |
| 92 | else: |
| 93 | entries = chromium_committers.get_list() |
| [email protected] | ba0cc0e | 2011-08-23 17:57:55 | [diff] [blame] | 94 | logging.info('Found %d committers' % len(entries)) |
| [email protected] | 95477b7 | 2011-12-06 16:01:35 | [diff] [blame] | 95 | return ['^%s$' % re.escape(i) for i in entries] |
| [email protected] | 1bee499 | 2011-04-12 00:27:57 | [diff] [blame] | 96 | |
| 97 | |
| [email protected] | e4bc2d6 | 2013-02-20 12:52:09 | [diff] [blame] | 98 | def _get_skia_committers(): |
| 99 | """Gets the list of all allowed committers.""" |
| 100 | if not skia_committers: |
| 101 | # Fake values. |
| 102 | entries = ['georges'] |
| 103 | else: |
| 104 | entries = skia_committers.get_list() |
| 105 | logging.info('Found %d committers' % len(entries)) |
| 106 | return ['^%s$' % re.escape(i) for i in entries] |
| 107 | |
| 108 | |
| [email protected] | 95477b7 | 2011-12-06 16:01:35 | [diff] [blame] | 109 | def _get_nacl_committers(): |
| [email protected] | 4acc60a | 2011-08-22 19:48:23 | [diff] [blame] | 110 | """Gets the list of all allowed committers.""" |
| [email protected] | 95477b7 | 2011-12-06 16:01:35 | [diff] [blame] | 111 | if not nacl_committers: |
| 112 | # Fake values. |
| 113 | entries = ['georges'] |
| 114 | else: |
| 115 | entries = nacl_committers.get_list() |
| [email protected] | ba0cc0e | 2011-08-23 17:57:55 | [diff] [blame] | 116 | logging.info('Found %d committers' % len(entries)) |
| [email protected] | 95477b7 | 2011-12-06 16:01:35 | [diff] [blame] | 117 | return ['^%s$' % re.escape(i) for i in entries] |
| [email protected] | 4acc60a | 2011-08-22 19:48:23 | [diff] [blame] | 118 | |
| 119 | |
| [email protected] | 4dc496d | 2012-01-04 21:07:37 | [diff] [blame] | 120 | def _get_gyp_committers(): |
| 121 | """Gets the list of all allowed committers.""" |
| 122 | if not gyp_committers: |
| 123 | # Fake values. |
| 124 | entries = ['georges'] |
| 125 | else: |
| 126 | entries = gyp_committers.get_list() |
| 127 | logging.info('Found %d committers' % len(entries)) |
| 128 | return ['^%s$' % re.escape(i) for i in entries] |
| 129 | |
| 130 | |
| [email protected] | de06350 | 2011-06-14 20:17:09 | [diff] [blame] | 131 | def _chromium_lkgr(): |
| 132 | try: |
| 133 | return int( |
| [email protected] | d3547fb | 2012-01-13 20:31:34 | [diff] [blame] | 134 | urllib2.urlopen('https://chromium-status.appspot.com/lkgr').read()) |
| 135 | except (ValueError, IOError): |
| 136 | return None |
| 137 | |
| 138 | |
| 139 | def _nacl_lkgr(): |
| 140 | try: |
| 141 | return int( |
| 142 | urllib2.urlopen('https://nativeclient-status.appspot.com/lkgr').read()) |
| [email protected] | de06350 | 2011-06-14 20:17:09 | [diff] [blame] | 143 | except (ValueError, IOError): |
| 144 | return None |
| 145 | |
| [email protected] | 03878dc | 2011-07-29 15:53:22 | [diff] [blame] | 146 | |
| 147 | def _chromium_status_pwd(root_dir): |
| 148 | filepath = os.path.join(root_dir, '.chromium_status_pwd') |
| [email protected] | 4acc60a | 2011-08-22 19:48:23 | [diff] [blame] | 149 | return _read_lines(filepath, 'chromium-status password')[0].strip() |
| [email protected] | 03878dc | 2011-07-29 15:53:22 | [diff] [blame] | 150 | |
| 151 | |
| [email protected] | 654a44a | 2013-04-09 02:37:03 | [diff] [blame] | 152 | def _gen_blink(user, root_dir, rietveld_obj, no_try): |
| 153 | """Generates a PendingManager commit queue for blink/trunk.""" |
| [email protected] | 654a44a | 2013-04-09 02:37:03 | [diff] [blame] | 154 | local_checkout = checkout.SvnCheckout( |
| 155 | root_dir, |
| 156 | 'blink', |
| 157 | user, |
| [email protected] | db6a801 | 2013-04-16 21:45:38 | [diff] [blame] | 158 | None, |
| [email protected] | 654a44a | 2013-04-09 02:37:03 | [diff] [blame] | 159 | 'svn://svn.chromium.org/blink/trunk', |
| 160 | []) |
| 161 | context_obj = context.Context( |
| 162 | rietveld_obj, |
| 163 | local_checkout, |
| 164 | async_push.AsyncPush( |
| 165 | 'https://chromium-status.appspot.com/cq', |
| 166 | _chromium_status_pwd(root_dir))) |
| 167 | |
| [email protected] | 666cf56 | 2013-04-09 03:53:51 | [diff] [blame] | 168 | project_bases = [ |
| 169 | '^%s/trunk(|/.*)$' % re.escape(base) for base in BLINK_SVN_BASES] |
| [email protected] | 04c822d | 2013-07-26 04:14:34 | [diff] [blame] | 170 | project_bases.append( |
| 171 | r'^https?\:\/\/chromium.googlesource.com\/chromium\/blink(?:\.git)?%s$' % |
| 172 | BRANCH_MATCH) |
| [email protected] | 654a44a | 2013-04-09 02:37:03 | [diff] [blame] | 173 | verifiers_no_patch = [ |
| 174 | project_base.ProjectBaseUrlVerifier(project_bases), |
| 175 | reviewer_lgtm.ReviewerLgtmVerifier( |
| 176 | _get_chromium_committers(), |
| 177 | [re.escape(user)]), |
| 178 | ] |
| [email protected] | 9a2bd59 | 2013-04-26 17:20:01 | [diff] [blame] | 179 | verifiers = [] |
| [email protected] | 39dcb6d | 2013-05-17 02:40:02 | [diff] [blame] | 180 | prereq_builder = 'blink_presubmit' |
| [email protected] | 9a2bd59 | 2013-04-26 17:20:01 | [diff] [blame] | 181 | prereq_tests = ['presubmit'] |
| 182 | step_verifiers = [ |
| 183 | try_job_steps.TryJobSteps(builder_name=prereq_builder, |
| 184 | steps=prereq_tests)] |
| [email protected] | 654a44a | 2013-04-09 02:37:03 | [diff] [blame] | 185 | if not no_try: |
| [email protected] | 6248599 | 2013-06-12 19:26:18 | [diff] [blame] | 186 | blink_tests = [ |
| [email protected] | 9e666df | 2014-01-16 01:21:43 | [diff] [blame] | 187 | 'blink_heap_unittests', |
| [email protected] | e75ed78 | 2013-09-30 23:39:26 | [diff] [blame] | 188 | 'blink_platform_unittests', |
| [email protected] | 68659ec | 2013-04-10 21:22:42 | [diff] [blame] | 189 | 'webkit_lint', |
| [email protected] | 6248599 | 2013-06-12 19:26:18 | [diff] [blame] | 190 | 'webkit_python_tests', |
| [email protected] | 68659ec | 2013-04-10 21:22:42 | [diff] [blame] | 191 | 'webkit_tests', |
| [email protected] | 6248599 | 2013-06-12 19:26:18 | [diff] [blame] | 192 | 'webkit_unit_tests', |
| [email protected] | 6248599 | 2013-06-12 19:26:18 | [diff] [blame] | 193 | 'wtf_unittests', |
| [email protected] | 68659ec | 2013-04-10 21:22:42 | [diff] [blame] | 194 | ] |
| [email protected] | 8c40319 | 2013-05-09 23:24:24 | [diff] [blame] | 195 | |
| 196 | # A "compile-only" bot runs the webkit_lint tests (which are fast) |
| 197 | # in order to pick up the default build targets. We don't use the |
| 198 | # "compile" step because that will build all the chromium targets, not |
| 199 | # just the blink-specific ones. |
| 200 | compile_only = [ 'webkit_lint' ] |
| 201 | |
| [email protected] | 654a44a | 2013-04-09 02:37:03 | [diff] [blame] | 202 | builders_and_tests = { |
| [email protected] | 8c40319 | 2013-05-09 23:24:24 | [diff] [blame] | 203 | 'mac_layout': compile_only, |
| 204 | 'win_layout': compile_only, |
| 205 | |
| [email protected] | f962fbc | 2013-10-24 01:28:47 | [diff] [blame] | 206 | 'linux_blink': blink_tests, |
| [email protected] | d55fded | 2013-07-28 04:32:27 | [diff] [blame] | 207 | 'linux_blink_rel': blink_tests, |
| 208 | 'mac_blink_rel': blink_tests, |
| 209 | 'win_blink_rel': blink_tests, |
| [email protected] | 654a44a | 2013-04-09 02:37:03 | [diff] [blame] | 210 | } |
| 211 | |
| [email protected] | 9a2bd59 | 2013-04-26 17:20:01 | [diff] [blame] | 212 | step_verifiers += [ |
| 213 | try_job_steps.TryJobSteps(builder_name=b, prereq_builder=prereq_builder, |
| 214 | prereq_tests=prereq_tests, steps=s) |
| [email protected] | 654a44a | 2013-04-09 02:37:03 | [diff] [blame] | 215 | for b, s in builders_and_tests.iteritems() |
| 216 | ] |
| 217 | |
| [email protected] | 9a2bd59 | 2013-04-26 17:20:01 | [diff] [blame] | 218 | verifiers.append(try_job_on_rietveld.TryRunnerRietveld( |
| 219 | context_obj, |
| 220 | 'http://build.chromium.org/p/tryserver.chromium/', |
| 221 | user, |
| 222 | step_verifiers, |
| 223 | IGNORED_STEPS, |
| 224 | 'src')) |
| [email protected] | 654a44a | 2013-04-09 02:37:03 | [diff] [blame] | 225 | |
| [email protected] | 570e138 | 2013-04-18 21:16:20 | [diff] [blame] | 226 | verifiers.append(tree_status.TreeStatusVerifier( |
| 227 | 'https://blink-status.appspot.com')) |
| [email protected] | 654a44a | 2013-04-09 02:37:03 | [diff] [blame] | 228 | return pending_manager.PendingManager( |
| 229 | context_obj, |
| 230 | verifiers_no_patch, |
| 231 | verifiers) |
| 232 | |
| 233 | |
| [email protected] | 9866352 | 2011-05-28 00:35:36 | [diff] [blame] | 234 | def _gen_chromium(user, root_dir, rietveld_obj, no_try): |
| [email protected] | 7d4b3e8 | 2010-12-22 02:43:30 | [diff] [blame] | 235 | """Generates a PendingManager commit queue for chrome/trunk/src.""" |
| [email protected] | 9866352 | 2011-05-28 00:35:36 | [diff] [blame] | 236 | local_checkout = checkout.SvnCheckout( |
| 237 | root_dir, |
| 238 | 'chromium', |
| 239 | user, |
| [email protected] | db6a801 | 2013-04-16 21:45:38 | [diff] [blame] | 240 | None, |
| [email protected] | 9ca3071 | 2011-06-12 00:56:12 | [diff] [blame] | 241 | 'svn://svn.chromium.org/chrome/trunk/src', |
| [email protected] | d91910e | 2013-05-16 14:26:08 | [diff] [blame] | 242 | [chromium_copyright.process]) |
| [email protected] | 03878dc | 2011-07-29 15:53:22 | [diff] [blame] | 243 | context_obj = context.Context( |
| 244 | rietveld_obj, |
| 245 | local_checkout, |
| 246 | async_push.AsyncPush( |
| [email protected] | 5d62dd0 | 2011-09-22 21:58:58 | [diff] [blame] | 247 | 'https://chromium-status.appspot.com/cq', |
| [email protected] | 03878dc | 2011-07-29 15:53:22 | [diff] [blame] | 248 | _chromium_status_pwd(root_dir))) |
| [email protected] | 7d4b3e8 | 2010-12-22 02:43:30 | [diff] [blame] | 249 | |
| [email protected] | bfa5ce8 | 2011-01-11 21:47:40 | [diff] [blame] | 250 | project_bases = [ |
| [email protected] | 1bee499 | 2011-04-12 00:27:57 | [diff] [blame] | 251 | '^%s/trunk/src(|/.*)$' % re.escape(base) for base in CHROME_SVN_BASES] |
| [email protected] | 104c653 | 2012-05-29 18:42:23 | [diff] [blame] | 252 | |
| 253 | aliases = ( |
| 254 | # Old path. |
| [email protected] | 04c822d | 2013-07-26 04:14:34 | [diff] [blame] | 255 | 'git.chromium.org/git/chromium', |
| [email protected] | 104c653 | 2012-05-29 18:42:23 | [diff] [blame] | 256 | # New path. |
| [email protected] | 04c822d | 2013-07-26 04:14:34 | [diff] [blame] | 257 | 'git.chromium.org/chromium/src', |
| 258 | 'chromium.googlesource.com/chromium/src', |
| [email protected] | d50e0ec | 2013-09-13 02:16:05 | [diff] [blame] | 259 | 'chromium.googlesource.com/a/chromium/src', |
| [email protected] | 104c653 | 2012-05-29 18:42:23 | [diff] [blame] | 260 | ) |
| [email protected] | e1415ab | 2012-07-16 13:54:20 | [diff] [blame] | 261 | project_bases.extend( |
| [email protected] | 04c822d | 2013-07-26 04:14:34 | [diff] [blame] | 262 | r'^https?\:\/\/%s(?:\.git)?%s$' % (re.escape(i), BRANCH_MATCH) |
| 263 | for i in aliases) |
| [email protected] | bfa5ce8 | 2011-01-11 21:47:40 | [diff] [blame] | 264 | verifiers_no_patch = [ |
| [email protected] | 4005b77 | 2011-02-09 22:58:24 | [diff] [blame] | 265 | project_base.ProjectBaseUrlVerifier(project_bases), |
| [email protected] | bfa5ce8 | 2011-01-11 21:47:40 | [diff] [blame] | 266 | reviewer_lgtm.ReviewerLgtmVerifier( |
| [email protected] | 95477b7 | 2011-12-06 16:01:35 | [diff] [blame] | 267 | _get_chromium_committers(), |
| [email protected] | bfe3335 | 2011-02-02 21:04:12 | [diff] [blame] | 268 | [re.escape(user)]), |
| [email protected] | 4005b77 | 2011-02-09 22:58:24 | [diff] [blame] | 269 | ] |
| [email protected] | 9a2bd59 | 2013-04-26 17:20:01 | [diff] [blame] | 270 | verifiers = [] |
| 271 | prereq_builder = 'chromium_presubmit' |
| 272 | prereq_tests = ['presubmit'] |
| 273 | step_verifiers = [ |
| 274 | try_job_steps.TryJobSteps(builder_name=prereq_builder, |
| 275 | steps=prereq_tests)] |
| [email protected] | 7d4b3e8 | 2010-12-22 02:43:30 | [diff] [blame] | 276 | if not no_try: |
| [email protected] | 2b7ee5a | 2012-02-22 19:54:27 | [diff] [blame] | 277 | # To add tests to this list, they MUST be in |
| 278 | # /chrome/trunk/tools/build/masters/master.chromium/master_gatekeeper_cfg.py |
| 279 | # or somehow close the tree whenever they break. |
| [email protected] | fd08e11 | 2012-09-13 13:04:25 | [diff] [blame] | 280 | standard_tests = [ |
| [email protected] | ec495a1 | 2011-01-10 20:36:56 | [diff] [blame] | 281 | 'base_unittests', |
| [email protected] | b7d8a70 | 2011-09-14 16:40:46 | [diff] [blame] | 282 | 'browser_tests', |
| [email protected] | 70851bb | 2011-07-29 17:48:46 | [diff] [blame] | 283 | 'cacheinvalidation_unittests', |
| [email protected] | aca10a5 | 2013-04-30 20:36:44 | [diff] [blame] | 284 | 'check_deps', |
| [email protected] | 14d6138 | 2013-12-17 09:41:51 | [diff] [blame] | 285 | 'check_deps2git', |
| [email protected] | 75e588b | 2012-08-09 20:29:49 | [diff] [blame] | 286 | 'content_browsertests', |
| [email protected] | e5a35cf | 2011-08-11 12:24:14 | [diff] [blame] | 287 | 'content_unittests', |
| [email protected] | 70851bb | 2011-07-29 17:48:46 | [diff] [blame] | 288 | 'crypto_unittests', |
| [email protected] | fd08e11 | 2012-09-13 13:04:25 | [diff] [blame] | 289 | #'gfx_unittests', |
| [email protected] | f8b9d8c | 2011-09-23 21:52:07 | [diff] [blame] | 290 | # Broken in release. |
| [email protected] | 4d43a13 | 2013-05-09 18:17:24 | [diff] [blame] | 291 | #'url_unittests', |
| [email protected] | 70851bb | 2011-07-29 17:48:46 | [diff] [blame] | 292 | 'gpu_unittests', |
| [email protected] | ec495a1 | 2011-01-10 20:36:56 | [diff] [blame] | 293 | 'ipc_tests', |
| [email protected] | d157134 | 2012-06-18 19:19:24 | [diff] [blame] | 294 | 'interactive_ui_tests', |
| [email protected] | 70851bb | 2011-07-29 17:48:46 | [diff] [blame] | 295 | 'jingle_unittests', |
| [email protected] | ec495a1 | 2011-01-10 20:36:56 | [diff] [blame] | 296 | 'media_unittests', |
| 297 | 'net_unittests', |
| [email protected] | ad3cfc2 | 2012-11-20 17:45:27 | [diff] [blame] | 298 | 'ppapi_unittests', |
| [email protected] | 70851bb | 2011-07-29 17:48:46 | [diff] [blame] | 299 | 'printing_unittests', |
| [email protected] | 5776dd7 | 2011-07-21 00:44:46 | [diff] [blame] | 300 | 'sql_unittests', |
| [email protected] | 70851bb | 2011-07-29 17:48:46 | [diff] [blame] | 301 | 'sync_unit_tests', |
| [email protected] | ec495a1 | 2011-01-10 20:36:56 | [diff] [blame] | 302 | 'unit_tests', |
| [email protected] | 2de2611 | 2012-01-25 14:12:35 | [diff] [blame] | 303 | #'webkit_unit_tests', |
| [email protected] | fd08e11 | 2012-09-13 13:04:25 | [diff] [blame] | 304 | ] |
| [email protected] | 1c64d37 | 2013-11-15 01:08:04 | [diff] [blame] | 305 | # Use a smaller set of tests for *_aura, since there's a lot of overlap with |
| 306 | # the corresponding *_rel builders. |
| 307 | # Note: *_aura are Release builders even if their names convey otherwise. |
| 308 | linux_aura_tests = [ |
| 309 | 'app_list_unittests', |
| 310 | 'aura_unittests', |
| 311 | 'browser_tests', |
| 312 | 'compositor_unittests', |
| 313 | 'content_browsertests', |
| 314 | 'content_unittests', |
| [email protected] | f779f1b | 2013-11-28 03:26:11 | [diff] [blame] | 315 | 'events_unittests', |
| [email protected] | 1c64d37 | 2013-11-15 01:08:04 | [diff] [blame] | 316 | 'interactive_ui_tests', |
| 317 | 'unit_tests', |
| 318 | ] |
| [email protected] | 2b7ee5a | 2012-02-22 19:54:27 | [diff] [blame] | 319 | builders_and_tests = { |
| [email protected] | f1461e1 | 2012-05-07 18:59:54 | [diff] [blame] | 320 | # TODO(maruel): Figure out a way to run 'sizes' where people can |
| 321 | # effectively update the perf expectation correctly. This requires a |
| 322 | # clobber=True build running 'sizes'. 'sizes' is not accurate with |
| 323 | # incremental build. Reference: |
| 324 | # http://chromium.org/developers/tree-sheriffs/perf-sheriffs. |
| 325 | # TODO(maruel): An option would be to run 'sizes' but not count a failure |
| 326 | # of this step as a try job failure. |
| [email protected] | 4d0de68 | 2013-02-21 06:49:18 | [diff] [blame] | 327 | 'android_dbg': ['slave_steps'], |
| 328 | 'android_clang_dbg': ['slave_steps'], |
| [email protected] | 96f94e3 | 2013-07-26 19:49:22 | [diff] [blame] | 329 | 'android_aosp': ['compile'], |
| [email protected] | e743032 | 2012-11-27 20:46:53 | [diff] [blame] | 330 | 'ios_dbg_simulator': [ |
| 331 | 'compile', |
| [email protected] | 6fffa84 | 2013-09-07 01:17:37 | [diff] [blame] | 332 | 'base_unittests', |
| 333 | 'content_unittests', |
| 334 | 'crypto_unittests', |
| 335 | 'url_unittests', |
| 336 | 'net_unittests', |
| 337 | 'sql_unittests', |
| 338 | 'ui_unittests', |
| [email protected] | e743032 | 2012-11-27 20:46:53 | [diff] [blame] | 339 | ], |
| 340 | 'ios_rel_device': ['compile'], |
| [email protected] | 1c64d37 | 2013-11-15 01:08:04 | [diff] [blame] | 341 | 'linux_aura': linux_aura_tests, |
| [email protected] | e743032 | 2012-11-27 20:46:53 | [diff] [blame] | 342 | 'linux_clang': ['compile'], |
| [email protected] | c4774eb | 2013-04-10 17:26:14 | [diff] [blame] | 343 | 'linux_chromeos_clang': ['compile'], |
| [email protected] | e743032 | 2012-11-27 20:46:53 | [diff] [blame] | 344 | # Note: It is a Release builder even if its name convey otherwise. |
| 345 | 'linux_chromeos': standard_tests + [ |
| [email protected] | 208725c | 2013-05-21 04:01:36 | [diff] [blame] | 346 | 'app_list_unittests', |
| [email protected] | 76d1b27 | 2012-11-28 02:16:48 | [diff] [blame] | 347 | 'aura_unittests', |
| [email protected] | 2604a83 | 2013-03-13 18:06:36 | [diff] [blame] | 348 | 'ash_unittests', |
| [email protected] | 6c6e15d | 2012-11-27 21:26:24 | [diff] [blame] | 349 | 'chromeos_unittests', |
| [email protected] | 8dab50f | 2013-01-18 05:59:01 | [diff] [blame] | 350 | 'components_unittests', |
| [email protected] | 6c6e15d | 2012-11-27 21:26:24 | [diff] [blame] | 351 | 'dbus_unittests', |
| 352 | 'device_unittests', |
| [email protected] | f779f1b | 2013-11-28 03:26:11 | [diff] [blame] | 353 | 'events_unittests', |
| [email protected] | 79a5361 | 2013-11-15 19:19:07 | [diff] [blame] | 354 | 'google_apis_unittests', |
| [email protected] | e743032 | 2012-11-27 20:46:53 | [diff] [blame] | 355 | 'sandbox_linux_unittests', |
| 356 | ], |
| [email protected] | fd08e11 | 2012-09-13 13:04:25 | [diff] [blame] | 357 | 'linux_rel': standard_tests + [ |
| [email protected] | b9d66d3 | 2013-05-01 02:12:38 | [diff] [blame] | 358 | 'cc_unittests', |
| [email protected] | 0b59ddf | 2013-12-18 21:39:35 | [diff] [blame] | 359 | 'chromedriver_unittests', |
| [email protected] | 8dab50f | 2013-01-18 05:59:01 | [diff] [blame] | 360 | 'components_unittests', |
| [email protected] | 79a5361 | 2013-11-15 19:19:07 | [diff] [blame] | 361 | 'google_apis_unittests', |
| [email protected] | fd08e11 | 2012-09-13 13:04:25 | [diff] [blame] | 362 | 'nacl_integration', |
| 363 | 'remoting_unittests', |
| [email protected] | fd08e11 | 2012-09-13 13:04:25 | [diff] [blame] | 364 | 'sandbox_linux_unittests', |
| 365 | 'sync_integration_tests', |
| [email protected] | 6ff436c | 2014-01-24 06:08:23 | [diff] [blame] | 366 | 'telemetry_perf_unittests', |
| 367 | 'telemetry_unittests', |
| [email protected] | fd08e11 | 2012-09-13 13:04:25 | [diff] [blame] | 368 | ], |
| [email protected] | 168261c | 2012-07-30 23:43:56 | [diff] [blame] | 369 | 'mac': ['compile'], |
| [email protected] | fd08e11 | 2012-09-13 13:04:25 | [diff] [blame] | 370 | 'mac_rel': standard_tests + [ |
| [email protected] | 28455be | 2013-10-17 23:23:06 | [diff] [blame] | 371 | 'app_list_unittests', |
| [email protected] | b9d66d3 | 2013-05-01 02:12:38 | [diff] [blame] | 372 | 'cc_unittests', |
| [email protected] | 0b59ddf | 2013-12-18 21:39:35 | [diff] [blame] | 373 | 'chromedriver_unittests', |
| [email protected] | 8dab50f | 2013-01-18 05:59:01 | [diff] [blame] | 374 | 'components_unittests', |
| [email protected] | de4a66d | 2013-11-06 03:54:15 | [diff] [blame] | 375 | 'google_apis_unittests', |
| [email protected] | b62bbfa | 2013-09-20 22:01:20 | [diff] [blame] | 376 | 'message_center_unittests', |
| [email protected] | fd08e11 | 2012-09-13 13:04:25 | [diff] [blame] | 377 | 'nacl_integration', |
| 378 | 'remoting_unittests', |
| [email protected] | fd08e11 | 2012-09-13 13:04:25 | [diff] [blame] | 379 | 'sync_integration_tests', |
| [email protected] | 6ff436c | 2014-01-24 06:08:23 | [diff] [blame] | 380 | 'telemetry_perf_unittests', |
| [email protected] | e5a0000 | 2013-07-24 23:20:09 | [diff] [blame] | 381 | 'telemetry_unittests', |
| [email protected] | fd08e11 | 2012-09-13 13:04:25 | [diff] [blame] | 382 | ], |
| [email protected] | e743032 | 2012-11-27 20:46:53 | [diff] [blame] | 383 | 'win': ['compile'], |
| [email protected] | fd08e11 | 2012-09-13 13:04:25 | [diff] [blame] | 384 | 'win_rel': standard_tests + [ |
| [email protected] | 28455be | 2013-10-17 23:23:06 | [diff] [blame] | 385 | 'app_list_unittests', |
| [email protected] | 96d655e | 2013-11-12 06:59:32 | [diff] [blame] | 386 | 'ash_unittests', |
| 387 | 'aura_unittests', |
| [email protected] | b9d66d3 | 2013-05-01 02:12:38 | [diff] [blame] | 388 | 'cc_unittests', |
| [email protected] | d4ef6bc | 2013-12-17 23:06:14 | [diff] [blame] | 389 | 'chrome_elf_unittests', |
| [email protected] | 0b59ddf | 2013-12-18 21:39:35 | [diff] [blame] | 390 | 'chromedriver_unittests', |
| [email protected] | 8dab50f | 2013-01-18 05:59:01 | [diff] [blame] | 391 | 'components_unittests', |
| [email protected] | 96d655e | 2013-11-12 06:59:32 | [diff] [blame] | 392 | 'compositor_unittests', |
| [email protected] | f779f1b | 2013-11-28 03:26:11 | [diff] [blame] | 393 | 'events_unittests', |
| [email protected] | 570af68 | 2013-12-14 02:32:29 | [diff] [blame] | 394 | 'google_apis_unittests', |
| [email protected] | fd08e11 | 2012-09-13 13:04:25 | [diff] [blame] | 395 | 'installer_util_unittests', |
| 396 | 'mini_installer_test', |
| [email protected] | 9c31196 | 2013-12-11 20:17:56 | [diff] [blame] | 397 | 'nacl_integration', |
| [email protected] | fd08e11 | 2012-09-13 13:04:25 | [diff] [blame] | 398 | 'remoting_unittests', |
| [email protected] | fd08e11 | 2012-09-13 13:04:25 | [diff] [blame] | 399 | 'sync_integration_tests', |
| [email protected] | 6ff436c | 2014-01-24 06:08:23 | [diff] [blame] | 400 | 'telemetry_perf_unittests', |
| [email protected] | e5a0000 | 2013-07-24 23:20:09 | [diff] [blame] | 401 | 'telemetry_unittests', |
| [email protected] | 96d655e | 2013-11-12 06:59:32 | [diff] [blame] | 402 | 'views_unittests', |
| [email protected] | fd08e11 | 2012-09-13 13:04:25 | [diff] [blame] | 403 | ], |
| [email protected] | 601203d | 2013-02-25 17:23:15 | [diff] [blame] | 404 | 'win_x64_rel': [ |
| [email protected] | 7a57272 | 2013-10-07 18:10:10 | [diff] [blame] | 405 | 'base_unittests', |
| [email protected] | 601203d | 2013-02-25 17:23:15 | [diff] [blame] | 406 | ], |
| [email protected] | 2b7ee5a | 2012-02-22 19:54:27 | [diff] [blame] | 407 | } |
| [email protected] | 9fd2b0e | 2013-02-20 19:47:49 | [diff] [blame] | 408 | |
| 409 | swarm_enabled_tests = ( |
| 410 | 'base_unittests', |
| [email protected] | 4d3c183 | 2013-02-21 14:07:18 | [diff] [blame] | 411 | 'browser_tests', |
| [email protected] | a154ae9 | 2013-05-02 13:29:59 | [diff] [blame] | 412 | 'interactive_ui_tests', |
| [email protected] | 9fd2b0e | 2013-02-20 19:47:49 | [diff] [blame] | 413 | 'net_unittests', |
| 414 | 'unit_tests', |
| 415 | ) |
| 416 | |
| [email protected] | e9ad0aa | 2013-10-08 13:49:04 | [diff] [blame] | 417 | # pylint: disable=W0612 |
| [email protected] | b33765f | 2013-03-14 19:31:28 | [diff] [blame] | 418 | swarm_test_map = dict( |
| [email protected] | 9fd2b0e | 2013-02-20 19:47:49 | [diff] [blame] | 419 | (test, test + '_swarm') for test in swarm_enabled_tests) |
| 420 | |
| [email protected] | e9ad0aa | 2013-10-08 13:49:04 | [diff] [blame] | 421 | # Commenting out the items below will make the CQ not use swarm for its |
| 422 | # execution. Uncomment to make the CQ use Swarming again. |
| [email protected] | 9fd2b0e | 2013-02-20 19:47:49 | [diff] [blame] | 423 | swarm_enabled_builders_and_tests = { |
| [email protected] | 35af124 | 2013-11-04 20:14:01 | [diff] [blame] | 424 | ('linux_rel', 'linux_swarm_triggered'): swarm_test_map, |
| [email protected] | 7a203fa | 2013-11-12 14:11:11 | [diff] [blame] | 425 | ('mac_rel', 'mac_swarm_triggered'): swarm_test_map, |
| [email protected] | 7a13938 | 2013-12-17 22:24:13 | [diff] [blame] | 426 | ('win_rel', 'win_swarm_triggered'): swarm_test_map, |
| [email protected] | 9fd2b0e | 2013-02-20 19:47:49 | [diff] [blame] | 427 | } |
| 428 | |
| [email protected] | 9a2bd59 | 2013-04-26 17:20:01 | [diff] [blame] | 429 | step_verifiers += [ |
| 430 | try_job_steps.TryJobSteps( |
| 431 | builder_name=b, prereq_builder=prereq_builder, |
| 432 | prereq_tests=prereq_tests, steps=s) |
| [email protected] | 9fd2b0e | 2013-02-20 19:47:49 | [diff] [blame] | 433 | for b, s in builders_and_tests.iteritems() |
| 434 | if b not in swarm_enabled_builders_and_tests |
| [email protected] | 43e3857 | 2013-02-06 15:57:31 | [diff] [blame] | 435 | ] + [ |
| [email protected] | 9fd2b0e | 2013-02-20 19:47:49 | [diff] [blame] | 436 | try_job_steps.TryJobTriggeredSteps( |
| 437 | builder_name='android_dbg_triggered_tests', |
| 438 | trigger_name='android_dbg', |
| [email protected] | 9a2bd59 | 2013-04-26 17:20:01 | [diff] [blame] | 439 | prereq_builder=prereq_builder, |
| 440 | prereq_tests=prereq_tests, |
| [email protected] | 7849c5f | 2013-02-21 22:04:05 | [diff] [blame] | 441 | steps={'slave_steps': 'slave_steps'}), |
| [email protected] | 43e3857 | 2013-02-06 15:57:31 | [diff] [blame] | 442 | ] |
| [email protected] | ca597bd | 2012-10-10 06:44:59 | [diff] [blame] | 443 | |
| [email protected] | 9fd2b0e | 2013-02-20 19:47:49 | [diff] [blame] | 444 | # Add the swarm enabled builders with swarm accepted tests. |
| [email protected] | b735f6d | 2013-10-22 18:23:47 | [diff] [blame] | 445 | for (builder, triggered), builder_swarm_enabled_tests in ( |
| [email protected] | 9fd2b0e | 2013-02-20 19:47:49 | [diff] [blame] | 446 | swarm_enabled_builders_and_tests.iteritems()): |
| 447 | regular_tests = list(set(builders_and_tests[builder]) - |
| [email protected] | e9ad0aa | 2013-10-08 13:49:04 | [diff] [blame] | 448 | set(builder_swarm_enabled_tests)) |
| [email protected] | 9fd2b0e | 2013-02-20 19:47:49 | [diff] [blame] | 449 | |
| 450 | step_verifiers.append( |
| 451 | try_job_steps.TryJobTriggeredOrNormalSteps( |
| [email protected] | b735f6d | 2013-10-22 18:23:47 | [diff] [blame] | 452 | builder_name=triggered, |
| [email protected] | 9fd2b0e | 2013-02-20 19:47:49 | [diff] [blame] | 453 | trigger_name=builder, |
| [email protected] | 9a2bd59 | 2013-04-26 17:20:01 | [diff] [blame] | 454 | prereq_builder=prereq_builder, |
| 455 | prereq_tests=prereq_tests, |
| [email protected] | e9ad0aa | 2013-10-08 13:49:04 | [diff] [blame] | 456 | steps=builder_swarm_enabled_tests, |
| [email protected] | 0d0a481 | 2013-02-21 16:26:37 | [diff] [blame] | 457 | trigger_bot_steps=regular_tests, |
| 458 | use_triggered_bot=False)) |
| [email protected] | 9fd2b0e | 2013-02-20 19:47:49 | [diff] [blame] | 459 | |
| [email protected] | 08d4ba9 | 2014-01-10 17:21:16 | [diff] [blame] | 460 | # Experimental recipe-based Chromium trybots. To avoid possible capacity |
| 461 | # problems, only enable for a small percentage of try runs. |
| [email protected] | 2f2aabf | 2014-01-15 16:26:52 | [diff] [blame] | 462 | # Disable as emergency measure - crbug.com/334681 |
| [email protected] | 08d4ba9 | 2014-01-10 17:21:16 | [diff] [blame] | 463 | verifiers.append( |
| 464 | trigger_experimental_try_job.TriggerExperimentalTryJobVerifier( |
| 465 | context_obj, |
| [email protected] | 0797864 | 2014-01-21 22:39:32 | [diff] [blame] | 466 | percentage=0.25, |
| [email protected] | 08d4ba9 | 2014-01-10 17:21:16 | [diff] [blame] | 467 | try_job_description={ |
| [email protected] | 08d4ba9 | 2014-01-10 17:21:16 | [diff] [blame] | 468 | 'linux_chromium_rel': ['defaulttests'], |
| [email protected] | 08d4ba9 | 2014-01-10 17:21:16 | [diff] [blame] | 469 | 'mac_chromium_rel': ['defaulttests'], |
| 470 | })) |
| 471 | |
| [email protected] | 9a2bd59 | 2013-04-26 17:20:01 | [diff] [blame] | 472 | verifiers.append(try_job_on_rietveld.TryRunnerRietveld( |
| 473 | context_obj, |
| 474 | 'http://build.chromium.org/p/tryserver.chromium/', |
| 475 | user, |
| 476 | step_verifiers, |
| 477 | IGNORED_STEPS, |
| 478 | 'src')) |
| [email protected] | 7d4b3e8 | 2010-12-22 02:43:30 | [diff] [blame] | 479 | |
| [email protected] | c799161 | 2011-01-18 22:04:09 | [diff] [blame] | 480 | verifiers.append(tree_status.TreeStatusVerifier( |
| [email protected] | 570e138 | 2013-04-18 21:16:20 | [diff] [blame] | 481 | 'https://chromium-status.appspot.com')) |
| [email protected] | 7d4b3e8 | 2010-12-22 02:43:30 | [diff] [blame] | 482 | return pending_manager.PendingManager( |
| [email protected] | 5dba4db | 2011-07-25 22:42:55 | [diff] [blame] | 483 | context_obj, |
| [email protected] | bfa5ce8 | 2011-01-11 21:47:40 | [diff] [blame] | 484 | verifiers_no_patch, |
| [email protected] | 9ca3071 | 2011-06-12 00:56:12 | [diff] [blame] | 485 | verifiers) |
| [email protected] | 7d4b3e8 | 2010-12-22 02:43:30 | [diff] [blame] | 486 | |
| 487 | |
| [email protected] | f275244 | 2013-02-21 16:17:52 | [diff] [blame] | 488 | def _skia_status_pwd(root_dir): |
| 489 | filepath = os.path.join(root_dir, '.skia_status_pwd') |
| 490 | return _read_lines(filepath, 'skia-status password')[0].strip() |
| 491 | |
| 492 | |
| [email protected] | b5b0184 | 2013-04-03 14:52:18 | [diff] [blame] | 493 | def _gen_skia(user, root_dir, rietveld_obj, no_try): |
| [email protected] | e4bc2d6 | 2013-02-20 12:52:09 | [diff] [blame] | 494 | """Generates a PendingManager commit queue for Skia. |
| [email protected] | 0d0a481 | 2013-02-21 16:26:37 | [diff] [blame] | 495 | |
| [email protected] | e4bc2d6 | 2013-02-20 12:52:09 | [diff] [blame] | 496 | Adds the following verifiers to the PendingManager: |
| 497 | * ProjectBaseUrlVerifier |
| 498 | * ReviewerLgtmVerifier |
| 499 | * PresubmitCheckVerifier |
| 500 | * TreeStatusVerifier |
| [email protected] | b5b0184 | 2013-04-03 14:52:18 | [diff] [blame] | 501 | * TryRunnerRietveld (runs compile trybots) |
| [email protected] | e4bc2d6 | 2013-02-20 12:52:09 | [diff] [blame] | 502 | """ |
| [email protected] | fcfd579 | 2013-02-22 13:55:42 | [diff] [blame] | 503 | naked_url = '://skia.googlecode.com/svn/trunk' |
| [email protected] | e4bc2d6 | 2013-02-20 12:52:09 | [diff] [blame] | 504 | local_checkout = checkout.SvnCheckout( |
| 505 | root_dir, |
| 506 | 'skia', |
| 507 | user, |
| [email protected] | db6a801 | 2013-04-16 21:45:38 | [diff] [blame] | 508 | None, |
| [email protected] | e4bc2d6 | 2013-02-20 12:52:09 | [diff] [blame] | 509 | 'https' + naked_url) |
| 510 | context_obj = context.Context( |
| 511 | rietveld_obj, |
| 512 | local_checkout, |
| 513 | async_push.AsyncPush( |
| 514 | 'https://skia-tree-status.appspot.com/cq', |
| [email protected] | a3c1400 | 2013-03-04 18:27:02 | [diff] [blame] | 515 | _skia_status_pwd(root_dir)), |
| 516 | server_hooks_missing=True) |
| [email protected] | e4bc2d6 | 2013-02-20 12:52:09 | [diff] [blame] | 517 | |
| 518 | project_bases = [ |
| 519 | '^%s(|/.*)$' % re.escape(base + naked_url) for base in ('http', 'https') |
| 520 | ] |
| [email protected] | 7bc5734 | 2013-12-05 17:55:09 | [diff] [blame] | 521 | project_bases.append( |
| 522 | r'^https?\:\/\/skia.googlesource.com\/skia(?:\.git)?%s$' % |
| 523 | BRANCH_MATCH) |
| [email protected] | e4bc2d6 | 2013-02-20 12:52:09 | [diff] [blame] | 524 | verifiers_no_patch = [ |
| 525 | project_base.ProjectBaseUrlVerifier(project_bases), |
| 526 | reviewer_lgtm.ReviewerLgtmVerifier( |
| 527 | _get_skia_committers(), |
| 528 | [re.escape(user)]), |
| 529 | ] |
| 530 | verifiers = [ |
| 531 | presubmit_check.PresubmitCheckVerifier(context_obj), |
| 532 | tree_status.TreeStatusVerifier( |
| [email protected] | 570e138 | 2013-04-18 21:16:20 | [diff] [blame] | 533 | 'https://skia-tree-status.appspot.com') |
| [email protected] | e4bc2d6 | 2013-02-20 12:52:09 | [diff] [blame] | 534 | ] |
| 535 | |
| [email protected] | b5b0184 | 2013-04-03 14:52:18 | [diff] [blame] | 536 | if not no_try: |
| [email protected] | 2db110c | 2013-09-21 19:17:16 | [diff] [blame] | 537 | # TODO(skia-infrastructure-team): Use skia.org instead of the below when it |
| 538 | # is ready. |
| 539 | try_server_url = 'http://skiabot-master.pogerlabs.com:10117/' |
| [email protected] | a1cb43d | 2013-04-09 17:16:51 | [diff] [blame] | 540 | |
| [email protected] | 316cd86 | 2013-08-06 16:57:28 | [diff] [blame] | 541 | # Get the required build steps and builder names from the try server. |
| [email protected] | 2db110c | 2013-09-21 19:17:16 | [diff] [blame] | 542 | compile_required_build_steps = json.load( |
| 543 | urllib2.urlopen( |
| 544 | try_server_url + 'json/cq_required_steps'))['cq_required_steps'] |
| [email protected] | a1cb43d | 2013-04-09 17:16:51 | [diff] [blame] | 545 | builder_names = list( |
| 546 | json.load(urllib2.urlopen(try_server_url + 'json/cqtrybots'))) |
| [email protected] | b5b0184 | 2013-04-03 14:52:18 | [diff] [blame] | 547 | |
| 548 | step_verifiers = [] |
| 549 | for builder_name in builder_names: |
| 550 | step_verifiers.append( |
| 551 | try_job_steps.TryJobSteps( |
| 552 | builder_name=builder_name, |
| 553 | steps=compile_required_build_steps)) |
| 554 | verifiers.append(try_job_on_rietveld.TryRunnerRietveld( |
| 555 | context_obj=context_obj, |
| 556 | try_server_url=try_server_url, |
| 557 | commit_user=user, |
| 558 | step_verifiers=step_verifiers, |
| 559 | ignored_steps=[], |
| 560 | solution='src')) |
| 561 | |
| [email protected] | e4bc2d6 | 2013-02-20 12:52:09 | [diff] [blame] | 562 | return pending_manager.PendingManager( |
| 563 | context_obj, |
| 564 | verifiers_no_patch, |
| 565 | verifiers) |
| 566 | |
| 567 | |
| [email protected] | 9866352 | 2011-05-28 00:35:36 | [diff] [blame] | 568 | def _gen_nacl(user, root_dir, rietveld_obj, no_try): |
| [email protected] | 8ed3998 | 2011-02-10 20:56:58 | [diff] [blame] | 569 | """Generates a PendingManager commit queue for Native Client.""" |
| [email protected] | 8ed3998 | 2011-02-10 20:56:58 | [diff] [blame] | 570 | offset = 'trunk/src/native_client' |
| [email protected] | 9866352 | 2011-05-28 00:35:36 | [diff] [blame] | 571 | local_checkout = checkout.SvnCheckout( |
| 572 | root_dir, |
| 573 | 'nacl', |
| 574 | user, |
| [email protected] | db6a801 | 2013-04-16 21:45:38 | [diff] [blame] | 575 | None, |
| [email protected] | 9866352 | 2011-05-28 00:35:36 | [diff] [blame] | 576 | 'svn://svn.chromium.org/native_client/' + offset) |
| [email protected] | 03878dc | 2011-07-29 15:53:22 | [diff] [blame] | 577 | context_obj = context.Context( |
| [email protected] | 613b773 | 2011-08-18 01:33:29 | [diff] [blame] | 578 | rietveld_obj, |
| 579 | local_checkout, |
| 580 | async_push.AsyncPush( |
| [email protected] | 5d62dd0 | 2011-09-22 21:58:58 | [diff] [blame] | 581 | 'https://nativeclient-status.appspot.com/cq', |
| [email protected] | 613b773 | 2011-08-18 01:33:29 | [diff] [blame] | 582 | _chromium_status_pwd(root_dir))) |
| [email protected] | 8ed3998 | 2011-02-10 20:56:58 | [diff] [blame] | 583 | |
| [email protected] | a129cf1 | 2011-05-16 19:30:21 | [diff] [blame] | 584 | host_aliases = SVN_HOST_ALIASES + [ |
| 585 | 'http://src.chromium.org', 'https://src.chromium.org'] |
| [email protected] | bdc32c6 | 2011-02-24 01:56:45 | [diff] [blame] | 586 | svn_bases = [i + '/native_client' for i in host_aliases] |
| [email protected] | 8ed3998 | 2011-02-10 20:56:58 | [diff] [blame] | 587 | project_bases = [ |
| [email protected] | bdc32c6 | 2011-02-24 01:56:45 | [diff] [blame] | 588 | '^%s/%s(|/.*)$' % (re.escape(base), offset) for base in svn_bases |
| [email protected] | 8ed3998 | 2011-02-10 20:56:58 | [diff] [blame] | 589 | ] |
| [email protected] | 9d96875 | 2013-03-08 02:16:04 | [diff] [blame] | 590 | aliases = ( |
| [email protected] | 04c822d | 2013-07-26 04:14:34 | [diff] [blame] | 591 | 'git.chromium.org/native_client/src/native_client', |
| 592 | 'chromium.googlesource.com/native_client/src/native_client', |
| [email protected] | 9d96875 | 2013-03-08 02:16:04 | [diff] [blame] | 593 | ) |
| 594 | project_bases.extend( |
| [email protected] | 04c822d | 2013-07-26 04:14:34 | [diff] [blame] | 595 | r'^https?\:\/\/%s(?:\.git)?%s$' % (re.escape(i), BRANCH_MATCH) |
| 596 | for i in aliases) |
| [email protected] | 8ed3998 | 2011-02-10 20:56:58 | [diff] [blame] | 597 | verifiers_no_patch = [ |
| 598 | project_base.ProjectBaseUrlVerifier(project_bases), |
| [email protected] | 8ed3998 | 2011-02-10 20:56:58 | [diff] [blame] | 599 | reviewer_lgtm.ReviewerLgtmVerifier( |
| [email protected] | 95477b7 | 2011-12-06 16:01:35 | [diff] [blame] | 600 | _get_nacl_committers(), |
| [email protected] | 8ed3998 | 2011-02-10 20:56:58 | [diff] [blame] | 601 | [re.escape(user)]), |
| 602 | ] |
| 603 | verifiers = [ |
| [email protected] | 037618f | 2012-10-31 13:06:18 | [diff] [blame] | 604 | presubmit_check.PresubmitCheckVerifier(context_obj), |
| [email protected] | 8ed3998 | 2011-02-10 20:56:58 | [diff] [blame] | 605 | ] |
| 606 | if not no_try: |
| [email protected] | 23df40b | 2011-07-21 00:44:22 | [diff] [blame] | 607 | # Grab the list of all the builders here. The commit queue needs to know |
| 608 | # which builders were triggered. TODO: makes this more automatic. |
| 609 | url = 'http://build.chromium.org/p/tryserver.nacl/json/builders' |
| [email protected] | 2b7ee5a | 2012-02-22 19:54:27 | [diff] [blame] | 610 | builders_and_tests = dict( |
| 611 | (key, []) for key in json.load(urllib2.urlopen(url)) |
| 612 | if (key.startswith('nacl-') and |
| 613 | 'toolchain' not in key and |
| [email protected] | 5a1c25c | 2012-05-04 19:54:35 | [diff] [blame] | 614 | 'valgrind' not in key and |
| [email protected] | ec5d6a9 | 2012-05-31 01:34:19 | [diff] [blame] | 615 | 'perf_panda' not in key and |
| 616 | 'arm_hw' not in key and |
| [email protected] | c3565e7 | 2012-06-29 16:14:48 | [diff] [blame] | 617 | 'shared' not in key and |
| [email protected] | ec5d6a9 | 2012-05-31 01:34:19 | [diff] [blame] | 618 | 'coverage' not in key) |
| [email protected] | 2b7ee5a | 2012-02-22 19:54:27 | [diff] [blame] | 619 | ) |
| [email protected] | bba0020 | 2012-07-24 20:04:13 | [diff] [blame] | 620 | verifiers.append(try_server.TryRunnerSvn( |
| [email protected] | 5dba4db | 2011-07-25 22:42:55 | [diff] [blame] | 621 | context_obj, |
| [email protected] | 8ed3998 | 2011-02-10 20:56:58 | [diff] [blame] | 622 | 'http://build.chromium.org/p/tryserver.nacl/', |
| 623 | user, |
| [email protected] | 2b7ee5a | 2012-02-22 19:54:27 | [diff] [blame] | 624 | builders_and_tests, |
| [email protected] | 4f4997d | 2012-03-09 02:11:50 | [diff] [blame] | 625 | IGNORED_STEPS, |
| [email protected] | bba0020 | 2012-07-24 20:04:13 | [diff] [blame] | 626 | 'native_client', |
| [email protected] | a45a649 | 2011-07-21 18:17:33 | [diff] [blame] | 627 | ['--root', 'native_client'], |
| [email protected] | bba0020 | 2012-07-24 20:04:13 | [diff] [blame] | 628 | _nacl_lkgr)) |
| [email protected] | 8ed3998 | 2011-02-10 20:56:58 | [diff] [blame] | 629 | |
| 630 | verifiers.append(tree_status.TreeStatusVerifier( |
| [email protected] | 570e138 | 2013-04-18 21:16:20 | [diff] [blame] | 631 | 'https://nativeclient-status.appspot.com')) |
| [email protected] | 8ed3998 | 2011-02-10 20:56:58 | [diff] [blame] | 632 | return pending_manager.PendingManager( |
| [email protected] | 5dba4db | 2011-07-25 22:42:55 | [diff] [blame] | 633 | context_obj, |
| [email protected] | 8ed3998 | 2011-02-10 20:56:58 | [diff] [blame] | 634 | verifiers_no_patch, |
| [email protected] | a45a649 | 2011-07-21 18:17:33 | [diff] [blame] | 635 | verifiers) |
| [email protected] | 8ed3998 | 2011-02-10 20:56:58 | [diff] [blame] | 636 | |
| 637 | |
| [email protected] | 4dc496d | 2012-01-04 21:07:37 | [diff] [blame] | 638 | def _gen_gyp(user, root_dir, rietveld_obj, no_try): |
| 639 | """Generates a PendingManager commit queue for GYP.""" |
| [email protected] | 4dc496d | 2012-01-04 21:07:37 | [diff] [blame] | 640 | naked_url = '://gyp.googlecode.com/svn/trunk' |
| 641 | local_checkout = checkout.SvnCheckout( |
| 642 | root_dir, |
| 643 | 'gyp', |
| 644 | user, |
| [email protected] | db6a801 | 2013-04-16 21:45:38 | [diff] [blame] | 645 | None, |
| [email protected] | 4dc496d | 2012-01-04 21:07:37 | [diff] [blame] | 646 | 'https' + naked_url) |
| 647 | context_obj = context.Context( |
| 648 | rietveld_obj, |
| 649 | local_checkout, |
| 650 | async_push.AsyncPush( |
| 651 | 'https://chromium-status.appspot.com/cq/receiver', |
| 652 | _chromium_status_pwd(root_dir))) |
| 653 | |
| 654 | project_bases = [ |
| 655 | '^%s(|/.*)$' % re.escape(base + naked_url) for base in ('http', 'https') |
| 656 | ] |
| 657 | verifiers_no_patch = [ |
| 658 | project_base.ProjectBaseUrlVerifier(project_bases), |
| 659 | reviewer_lgtm.ReviewerLgtmVerifier( |
| 660 | _get_gyp_committers(), |
| 661 | [re.escape(user)]), |
| 662 | ] |
| 663 | verifiers = [] |
| 664 | if not no_try: |
| 665 | # Grab the list of all the builders here. The commit queue needs to know |
| 666 | # which builders were triggered. TODO: makes this more automatic. |
| 667 | # GYP is using the Nacl try server. |
| 668 | url = 'http://build.chromium.org/p/tryserver.nacl/json/builders' |
| [email protected] | 2b7ee5a | 2012-02-22 19:54:27 | [diff] [blame] | 669 | builders_and_tests = dict( |
| 670 | (key, []) for key in json.load(urllib2.urlopen(url)) |
| 671 | if key.startswith('gyp-') |
| 672 | ) |
| [email protected] | bba0020 | 2012-07-24 20:04:13 | [diff] [blame] | 673 | verifiers.append(try_server.TryRunnerSvn( |
| [email protected] | 4dc496d | 2012-01-04 21:07:37 | [diff] [blame] | 674 | context_obj, |
| 675 | 'http://build.chromium.org/p/tryserver.nacl/', |
| 676 | user, |
| [email protected] | 2b7ee5a | 2012-02-22 19:54:27 | [diff] [blame] | 677 | builders_and_tests, |
| [email protected] | 4f4997d | 2012-03-09 02:11:50 | [diff] [blame] | 678 | IGNORED_STEPS, |
| [email protected] | bba0020 | 2012-07-24 20:04:13 | [diff] [blame] | 679 | 'gyp', |
| [email protected] | 4dc496d | 2012-01-04 21:07:37 | [diff] [blame] | 680 | ['--root', 'gyp'], |
| [email protected] | bba0020 | 2012-07-24 20:04:13 | [diff] [blame] | 681 | lambda: None)) |
| [email protected] | 4dc496d | 2012-01-04 21:07:37 | [diff] [blame] | 682 | |
| 683 | verifiers.append(tree_status.TreeStatusVerifier( |
| [email protected] | 570e138 | 2013-04-18 21:16:20 | [diff] [blame] | 684 | 'https://gyp-status.appspot.com/status')) |
| [email protected] | 4dc496d | 2012-01-04 21:07:37 | [diff] [blame] | 685 | return pending_manager.PendingManager( |
| 686 | context_obj, |
| 687 | verifiers_no_patch, |
| 688 | verifiers) |
| 689 | |
| 690 | |
| [email protected] | 708cd90 | 2012-04-24 17:52:27 | [diff] [blame] | 691 | def _gen_tools(user, root_dir, rietveld_obj, _no_try): |
| [email protected] | 4202f32 | 2011-08-18 01:20:07 | [diff] [blame] | 692 | """Generates a PendingManager commit queue for everything under |
| 693 | chrome/trunk/tools. |
| [email protected] | 5a1cc9d | 2010-12-23 03:11:21 | [diff] [blame] | 694 | |
| [email protected] | 4202f32 | 2011-08-18 01:20:07 | [diff] [blame] | 695 | These don't have a try server but have presubmit checks. |
| [email protected] | 5a1cc9d | 2010-12-23 03:11:21 | [diff] [blame] | 696 | """ |
| [email protected] | 708cd90 | 2012-04-24 17:52:27 | [diff] [blame] | 697 | # Ignore no_try. |
| [email protected] | 104c653 | 2012-05-29 18:42:23 | [diff] [blame] | 698 | path = 'tools' |
| 699 | project_bases = [ |
| 700 | '^%s/trunk/%s(|/.*)$' % (re.escape(base), path) |
| 701 | for base in CHROME_SVN_BASES |
| 702 | ] |
| [email protected] | 104c653 | 2012-05-29 18:42:23 | [diff] [blame] | 703 | aliases = ( |
| [email protected] | 04c822d | 2013-07-26 04:14:34 | [diff] [blame] | 704 | # Old path. |
| 705 | 'git.chromium.org/git/chromium/tools', |
| 706 | # New path. |
| 707 | 'git.chromium.org/chromium/tools', |
| 708 | 'chromium.googlesource.com/chromium/tools', |
| [email protected] | d50e0ec | 2013-09-13 02:16:05 | [diff] [blame] | 709 | 'chromium.googlesource.com/a/chromium/tools', |
| [email protected] | 104c653 | 2012-05-29 18:42:23 | [diff] [blame] | 710 | ) |
| [email protected] | 04c822d | 2013-07-26 04:14:34 | [diff] [blame] | 711 | project_bases.extend( |
| 712 | r'^https?\:\/\/%s\/([a-z0-9\-_]+)(?:\.git)?%s$' % ( |
| 713 | re.escape(i), BRANCH_MATCH) for i in aliases) |
| [email protected] | 104c653 | 2012-05-29 18:42:23 | [diff] [blame] | 714 | return _internal_simple(path, project_bases, user, root_dir, rietveld_obj) |
| [email protected] | 6c025cf | 2011-05-27 12:44:52 | [diff] [blame] | 715 | |
| 716 | |
| [email protected] | 708cd90 | 2012-04-24 17:52:27 | [diff] [blame] | 717 | def _gen_chromium_deps(user, root_dir, rietveld_obj, _no_try): |
| [email protected] | 6c025cf | 2011-05-27 12:44:52 | [diff] [blame] | 718 | """Generates a PendingManager commit queue for |
| 719 | chrome/trunk/deps/. |
| 720 | """ |
| [email protected] | 708cd90 | 2012-04-24 17:52:27 | [diff] [blame] | 721 | # Ignore no_try. |
| [email protected] | 104c653 | 2012-05-29 18:42:23 | [diff] [blame] | 722 | path = 'deps' |
| 723 | project_bases = [ |
| 724 | '^%s/trunk/%s(|/.*)$' % (re.escape(base), path) |
| 725 | for base in CHROME_SVN_BASES |
| 726 | ] |
| 727 | return _internal_simple(path, project_bases, user, root_dir, rietveld_obj) |
| [email protected] | c47cf50 | 2011-02-02 15:48:58 | [diff] [blame] | 728 | |
| 729 | |
| [email protected] | 104c653 | 2012-05-29 18:42:23 | [diff] [blame] | 730 | def _internal_simple(path, project_bases, user, root_dir, rietveld_obj): |
| [email protected] | 5a1cc9d | 2010-12-23 03:11:21 | [diff] [blame] | 731 | """Generates a PendingManager commit queue for chrome/trunk/tools/build.""" |
| [email protected] | 9866352 | 2011-05-28 00:35:36 | [diff] [blame] | 732 | local_checkout = checkout.SvnCheckout( |
| 733 | root_dir, |
| 734 | os.path.basename(path), |
| 735 | user, |
| [email protected] | db6a801 | 2013-04-16 21:45:38 | [diff] [blame] | 736 | None, |
| [email protected] | 9ca3071 | 2011-06-12 00:56:12 | [diff] [blame] | 737 | 'svn://svn.chromium.org/chrome/trunk/' + path, |
| [email protected] | d91910e | 2013-05-16 14:26:08 | [diff] [blame] | 738 | [chromium_copyright.process]) |
| [email protected] | 03878dc | 2011-07-29 15:53:22 | [diff] [blame] | 739 | context_obj = context.Context( |
| [email protected] | 613b773 | 2011-08-18 01:33:29 | [diff] [blame] | 740 | rietveld_obj, |
| 741 | local_checkout, |
| 742 | async_push.AsyncPush( |
| [email protected] | 5d62dd0 | 2011-09-22 21:58:58 | [diff] [blame] | 743 | 'https://chromium-status.appspot.com/cq', |
| [email protected] | 613b773 | 2011-08-18 01:33:29 | [diff] [blame] | 744 | _chromium_status_pwd(root_dir))) |
| [email protected] | 7d4b3e8 | 2010-12-22 02:43:30 | [diff] [blame] | 745 | |
| [email protected] | bfa5ce8 | 2011-01-11 21:47:40 | [diff] [blame] | 746 | verifiers_no_patch = [ |
| [email protected] | 4005b77 | 2011-02-09 22:58:24 | [diff] [blame] | 747 | project_base.ProjectBaseUrlVerifier(project_bases), |
| [email protected] | bfa5ce8 | 2011-01-11 21:47:40 | [diff] [blame] | 748 | reviewer_lgtm.ReviewerLgtmVerifier( |
| [email protected] | 95477b7 | 2011-12-06 16:01:35 | [diff] [blame] | 749 | _get_chromium_committers(), |
| [email protected] | bfe3335 | 2011-02-02 21:04:12 | [diff] [blame] | 750 | [re.escape(user)]), |
| [email protected] | 4005b77 | 2011-02-09 22:58:24 | [diff] [blame] | 751 | ] |
| 752 | verifiers = [ |
| [email protected] | b95596d | 2012-05-04 22:50:58 | [diff] [blame] | 753 | presubmit_check.PresubmitCheckVerifier(context_obj, timeout=900), |
| [email protected] | 4005b77 | 2011-02-09 22:58:24 | [diff] [blame] | 754 | ] |
| [email protected] | bfa5ce8 | 2011-01-11 21:47:40 | [diff] [blame] | 755 | |
| [email protected] | 7d4b3e8 | 2010-12-22 02:43:30 | [diff] [blame] | 756 | return pending_manager.PendingManager( |
| [email protected] | 5dba4db | 2011-07-25 22:42:55 | [diff] [blame] | 757 | context_obj, |
| [email protected] | bfa5ce8 | 2011-01-11 21:47:40 | [diff] [blame] | 758 | verifiers_no_patch, |
| [email protected] | 9ca3071 | 2011-06-12 00:56:12 | [diff] [blame] | 759 | verifiers) |
| [email protected] | 7d4b3e8 | 2010-12-22 02:43:30 | [diff] [blame] | 760 | |
| 761 | |
| 762 | def supported_projects(): |
| 763 | """List the projects that can be managed by the commit queue.""" |
| [email protected] | 1ee1dd0 | 2014-01-28 18:23:28 | [diff] [blame^] | 764 | return sorted( |
| 765 | x[5:] for x in dir(sys.modules[__name__]) if x.startswith('_gen_')) |
| [email protected] | 7d4b3e8 | 2010-12-22 02:43:30 | [diff] [blame] | 766 | |
| 767 | |
| [email protected] | 9866352 | 2011-05-28 00:35:36 | [diff] [blame] | 768 | def load_project(project, user, root_dir, rietveld_obj, no_try): |
| [email protected] | 1ee1dd0 | 2014-01-28 18:23:28 | [diff] [blame^] | 769 | """Loads the specified project.""" |
| [email protected] | 7859f23 | 2012-10-08 17:09:36 | [diff] [blame] | 770 | assert os.path.isabs(root_dir) |
| [email protected] | 1ee1dd0 | 2014-01-28 18:23:28 | [diff] [blame^] | 771 | return getattr(sys.modules[__name__], '_gen_' + project)( |
| 772 | user, root_dir, rietveld_obj, no_try) |