| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 from infra.libs.infra_types import freeze | 5 from infra.libs.infra_types import freeze |
| 6 | 6 |
| 7 DEPS = [ | 7 DEPS = [ |
| 8 'bot_update', | 8 'bot_update', |
| 9 'chromium', | 9 'chromium', |
| 10 'chromium_tests', | 10 'chromium_tests', |
| 11 'json', | 11 'json', |
| 12 'path', | 12 'path', |
| 13 'platform', | 13 'platform', |
| 14 'properties', | 14 'properties', |
| 15 'step', | 15 'step', |
| 16 'test_utils', | 16 'test_utils', |
| 17 'tryserver', | 17 'tryserver', |
| 18 ] | 18 ] |
| 19 | 19 |
| 20 | 20 |
| 21 BUILDERS = freeze({ | 21 BUILDERS = freeze({ |
| 22 'chromium.mac': { | 22 'chromium.mac': { |
| 23 'builders': { | 23 'builders': { |
| 24 'Mac GN': { | 24 'Mac GN': { |
| 25 'chromium_config_kwargs': { | 25 'chromium_config_kwargs': { |
| 26 'BUILD_CONFIG': 'Release', | 26 'BUILD_CONFIG': 'Release', |
| 27 'TARGET_PLATFORM': 'mac', | 27 'TARGET_PLATFORM': 'mac', |
| 28 }, | 28 }, |
| 29 'should_use_mb': True, | |
| 30 }, | 29 }, |
| 31 'Mac GN (dbg)': { | 30 'Mac GN (dbg)': { |
| 32 'chromium_config_kwargs': { | 31 'chromium_config_kwargs': { |
| 33 'BUILD_CONFIG': 'Debug', | 32 'BUILD_CONFIG': 'Debug', |
| 34 'TARGET_PLATFORM': 'mac', | 33 'TARGET_PLATFORM': 'mac', |
| 35 }, | 34 }, |
| 36 'should_use_mb': True, | |
| 37 }, | 35 }, |
| 38 }, | 36 }, |
| 39 }, | 37 }, |
| 40 'chromium.webkit': { | 38 'chromium.webkit': { |
| 41 'builders': { | 39 'builders': { |
| 42 'Android GN': { | 40 'Android GN': { |
| 43 'chromium_apply_config': ['gn_minimal_symbols'], | 41 'chromium_apply_config': ['gn_minimal_symbols'], |
| 44 'chromium_config_kwargs': { | 42 'chromium_config_kwargs': { |
| 45 'BUILD_CONFIG': 'Release', | 43 'BUILD_CONFIG': 'Release', |
| 46 'TARGET_PLATFORM': 'android', | 44 'TARGET_PLATFORM': 'android', |
| 47 'TARGET_ARCH': 'arm', | 45 'TARGET_ARCH': 'arm', |
| 48 }, | 46 }, |
| 49 'gclient_apply_config': ['android', 'blink'], | 47 'gclient_apply_config': ['android', 'blink'], |
| 50 'should_use_mb': True, | |
| 51 }, | 48 }, |
| 52 'Android GN (dbg)': { | 49 'Android GN (dbg)': { |
| 53 'chromium_apply_config': ['gn_minimal_symbols'], | 50 'chromium_apply_config': ['gn_minimal_symbols'], |
| 54 'chromium_config_kwargs': { | 51 'chromium_config_kwargs': { |
| 55 'BUILD_CONFIG': 'Debug', | 52 'BUILD_CONFIG': 'Debug', |
| 56 'TARGET_PLATFORM': 'android', | 53 'TARGET_PLATFORM': 'android', |
| 57 'TARGET_ARCH': 'arm', | 54 'TARGET_ARCH': 'arm', |
| 58 }, | 55 }, |
| 59 'gclient_apply_config': ['android', 'blink'], | 56 'gclient_apply_config': ['android', 'blink'], |
| 60 'should_use_mb': True, | |
| 61 }, | 57 }, |
| 62 'Linux GN': { | 58 'Linux GN': { |
| 63 'chromium_config_kwargs': { | 59 'chromium_config_kwargs': { |
| 64 'BUILD_CONFIG': 'Release', | 60 'BUILD_CONFIG': 'Release', |
| 65 'TARGET_PLATFORM': 'linux', | 61 'TARGET_PLATFORM': 'linux', |
| 66 'TARGET_BITS': 64, | 62 'TARGET_BITS': 64, |
| 67 }, | 63 }, |
| 68 'gclient_apply_config': ['blink'], | 64 'gclient_apply_config': ['blink'], |
| 69 'should_run_mojo_tests': True, | 65 'should_run_mojo_tests': True, |
| 70 'should_use_mb': True, | |
| 71 }, | 66 }, |
| 72 'Linux GN (dbg)': { | 67 'Linux GN (dbg)': { |
| 73 'chromium_apply_config': ['gn_component_build'], | 68 'chromium_apply_config': ['gn_component_build'], |
| 74 'chromium_config_kwargs': { | 69 'chromium_config_kwargs': { |
| 75 'BUILD_CONFIG': 'Debug', | 70 'BUILD_CONFIG': 'Debug', |
| 76 'TARGET_PLATFORM': 'linux', | 71 'TARGET_PLATFORM': 'linux', |
| 77 'TARGET_BITS': 64, | 72 'TARGET_BITS': 64, |
| 78 }, | 73 }, |
| 79 'gclient_apply_config': ['blink'], | 74 'gclient_apply_config': ['blink'], |
| 80 'should_use_mb': True, | |
| 81 }, | 75 }, |
| 82 }, | 76 }, |
| 83 }, | 77 }, |
| 84 'tryserver.blink': { | 78 'tryserver.blink': { |
| 85 'builders': { | 79 'builders': { |
| 86 'android_chromium_gn_compile_rel': { | 80 'android_chromium_gn_compile_rel': { |
| 87 'chromium_apply_config': ['gn_minimal_symbols'], | 81 'chromium_apply_config': ['gn_minimal_symbols'], |
| 88 'chromium_config_kwargs': { | 82 'chromium_config_kwargs': { |
| 89 'BUILD_CONFIG': 'Release', | 83 'BUILD_CONFIG': 'Release', |
| 90 'TARGET_PLATFORM': 'android', | 84 'TARGET_PLATFORM': 'android', |
| 91 'TARGET_ARCH': 'arm', | 85 'TARGET_ARCH': 'arm', |
| 92 }, | 86 }, |
| 93 'gclient_apply_config': ['android', 'blink'], | 87 'gclient_apply_config': ['android', 'blink'], |
| 94 'should_use_mb': True, | |
| 95 }, | 88 }, |
| 96 'linux_chromium_gn_rel': { | 89 'linux_chromium_gn_rel': { |
| 97 'chromium_config_kwargs': { | 90 'chromium_config_kwargs': { |
| 98 'BUILD_CONFIG': 'Release', | 91 'BUILD_CONFIG': 'Release', |
| 99 'TARGET_PLATFORM': 'linux', | 92 'TARGET_PLATFORM': 'linux', |
| 100 'TARGET_BITS': 64, | 93 'TARGET_BITS': 64, |
| 101 }, | 94 }, |
| 102 'gclient_apply_config': ['blink'], | 95 'gclient_apply_config': ['blink'], |
| 103 'should_use_mb': True, | |
| 104 }, | 96 }, |
| 105 }, | 97 }, |
| 106 }, | 98 }, |
| 107 'chromium.chromiumos': { | 99 'chromium.chromiumos': { |
| 108 'builders': { | 100 'builders': { |
| 109 'Linux ChromiumOS GN': { | 101 'Linux ChromiumOS GN': { |
| 110 'chromium_config_kwargs': { | 102 'chromium_config_kwargs': { |
| 111 'BUILD_CONFIG': 'Release', | 103 'BUILD_CONFIG': 'Release', |
| 112 'TARGET_PLATFORM': 'chromeos', | 104 'TARGET_PLATFORM': 'chromeos', |
| 113 }, | 105 }, |
| 114 'should_use_mb': True, | |
| 115 }, | 106 }, |
| 116 'Linux ChromiumOS GN (dbg)': { | 107 'Linux ChromiumOS GN (dbg)': { |
| 117 'chromium_config_kwargs': { | 108 'chromium_config_kwargs': { |
| 118 'BUILD_CONFIG': 'Debug', | 109 'BUILD_CONFIG': 'Debug', |
| 119 'TARGET_PLATFORM': 'chromeos', | 110 'TARGET_PLATFORM': 'chromeos', |
| 120 }, | 111 }, |
| 121 'should_use_mb': True, | |
| 122 }, | 112 }, |
| 123 }, | 113 }, |
| 124 }, | 114 }, |
| 125 'chromium.linux': { | 115 'chromium.linux': { |
| 126 'builders': { | 116 'builders': { |
| 127 'Android GN': { | 117 'Android GN': { |
| 128 'chromium_apply_config': ['gn_minimal_symbols'], | 118 'chromium_apply_config': ['gn_minimal_symbols'], |
| 129 'chromium_config_kwargs': { | 119 'chromium_config_kwargs': { |
| 130 'BUILD_CONFIG': 'Release', | 120 'BUILD_CONFIG': 'Release', |
| 131 'TARGET_PLATFORM': 'android', | 121 'TARGET_PLATFORM': 'android', |
| 132 'TARGET_ARCH': 'arm', | 122 'TARGET_ARCH': 'arm', |
| 133 }, | 123 }, |
| 134 'gclient_apply_config': ['android'], | 124 'gclient_apply_config': ['android'], |
| 135 'should_use_mb': True, | |
| 136 }, | 125 }, |
| 137 'Android GN (dbg)': { | 126 'Android GN (dbg)': { |
| 138 'chromium_apply_config': ['gn_minimal_symbols'], | 127 'chromium_apply_config': ['gn_minimal_symbols'], |
| 139 'chromium_config_kwargs': { | 128 'chromium_config_kwargs': { |
| 140 'BUILD_CONFIG': 'Debug', | 129 'BUILD_CONFIG': 'Debug', |
| 141 'TARGET_PLATFORM': 'android', | 130 'TARGET_PLATFORM': 'android', |
| 142 'TARGET_ARCH': 'arm', | 131 'TARGET_ARCH': 'arm', |
| 143 }, | 132 }, |
| 144 'gclient_apply_config': ['android'], | 133 'gclient_apply_config': ['android'], |
| 145 'should_use_mb': True, | |
| 146 }, | 134 }, |
| 147 'Linux GN': { | 135 'Linux GN': { |
| 148 'chromium_config_kwargs': { | 136 'chromium_config_kwargs': { |
| 149 'BUILD_CONFIG': 'Release', | 137 'BUILD_CONFIG': 'Release', |
| 150 'TARGET_PLATFORM': 'linux', | 138 'TARGET_PLATFORM': 'linux', |
| 151 'TARGET_BITS': 64, | 139 'TARGET_BITS': 64, |
| 152 }, | 140 }, |
| 153 'should_run_gn_gyp_compare': True, | 141 'should_run_gn_gyp_compare': True, |
| 154 'should_run_tests': True, | 142 'should_run_tests': True, |
| 155 'should_use_mb': True, | |
| 156 }, | 143 }, |
| 157 'Linux GN (dbg)': { | 144 'Linux GN (dbg)': { |
| 158 'chromium_apply_config': ['gn_component_build'], | 145 'chromium_apply_config': ['gn_component_build'], |
| 159 'chromium_config_kwargs': { | 146 'chromium_config_kwargs': { |
| 160 'BUILD_CONFIG': 'Debug', | 147 'BUILD_CONFIG': 'Debug', |
| 161 'TARGET_PLATFORM': 'linux', | 148 'TARGET_PLATFORM': 'linux', |
| 162 'TARGET_BITS': 64, | 149 'TARGET_BITS': 64, |
| 163 }, | 150 }, |
| 164 'should_run_gn_gyp_compare': True, | 151 'should_run_gn_gyp_compare': True, |
| 165 'should_use_mb': True, | |
| 166 }, | 152 }, |
| 167 }, | 153 }, |
| 168 }, | 154 }, |
| 169 'chromium.win': { | 155 'chromium.win': { |
| 170 'builders': { | 156 'builders': { |
| 171 'Win x64 GN': { | 157 'Win x64 GN': { |
| 172 'chromium_apply_config': ['gn_minimal_symbols'], | 158 'chromium_apply_config': ['gn_minimal_symbols'], |
| 173 'chromium_config_kwargs': { | 159 'chromium_config_kwargs': { |
| 174 'BUILD_CONFIG': 'Release', | 160 'BUILD_CONFIG': 'Release', |
| 175 'TARGET_PLATFORM': 'win', | 161 'TARGET_PLATFORM': 'win', |
| 176 'TARGET_BITS': 64, | 162 'TARGET_BITS': 64, |
| 177 }, | 163 }, |
| 178 'should_use_mb': True, | |
| 179 }, | 164 }, |
| 180 'Win x64 GN (dbg)': { | 165 'Win x64 GN (dbg)': { |
| 181 'chromium_apply_config': ['gn_minimal_symbols'], | 166 'chromium_apply_config': ['gn_minimal_symbols'], |
| 182 'chromium_config_kwargs': { | 167 'chromium_config_kwargs': { |
| 183 'BUILD_CONFIG': 'Debug', | 168 'BUILD_CONFIG': 'Debug', |
| 184 'TARGET_PLATFORM': 'win', | 169 'TARGET_PLATFORM': 'win', |
| 185 'TARGET_BITS': 64, | 170 'TARGET_BITS': 64, |
| 186 }, | 171 }, |
| 187 'should_use_mb': True, | |
| 188 }, | 172 }, |
| 189 'Win8 GN': { | 173 'Win8 GN': { |
| 190 'chromium_apply_config': ['gn_minimal_symbols'], | 174 'chromium_apply_config': ['gn_minimal_symbols'], |
| 191 'chromium_config_kwargs': { | 175 'chromium_config_kwargs': { |
| 192 'BUILD_CONFIG': 'Release', | 176 'BUILD_CONFIG': 'Release', |
| 193 'TARGET_PLATFORM': 'win', | 177 'TARGET_PLATFORM': 'win', |
| 194 'TARGET_BITS': 32, | 178 'TARGET_BITS': 32, |
| 195 }, | 179 }, |
| 196 'should_use_mb': True, | |
| 197 }, | 180 }, |
| 198 'Win8 GN (dbg)': { | 181 'Win8 GN (dbg)': { |
| 199 'chromium_apply_config': ['gn_minimal_symbols'], | 182 'chromium_apply_config': ['gn_minimal_symbols'], |
| 200 'chromium_config_kwargs': { | 183 'chromium_config_kwargs': { |
| 201 'BUILD_CONFIG': 'Debug', | 184 'BUILD_CONFIG': 'Debug', |
| 202 'TARGET_PLATFORM': 'win', | 185 'TARGET_PLATFORM': 'win', |
| 203 'TARGET_BITS': 32, | 186 'TARGET_BITS': 32, |
| 204 }, | 187 }, |
| 205 'should_use_mb': True, | |
| 206 }, | 188 }, |
| 207 }, | 189 }, |
| 208 }, | 190 }, |
| 209 'tryserver.chromium.linux': { | 191 'tryserver.chromium.linux': { |
| 210 'builders': { | 192 'builders': { |
| 211 'android_chromium_gn_compile_rel': { | 193 'android_chromium_gn_compile_rel': { |
| 212 'chromium_apply_config': ['gn_minimal_symbols'], | 194 'chromium_apply_config': ['gn_minimal_symbols'], |
| 213 'chromium_config_kwargs': { | 195 'chromium_config_kwargs': { |
| 214 'BUILD_CONFIG': 'Release', | 196 'BUILD_CONFIG': 'Release', |
| 215 'TARGET_PLATFORM': 'android', | 197 'TARGET_PLATFORM': 'android', |
| 216 'TARGET_ARCH': 'arm', | 198 'TARGET_ARCH': 'arm', |
| 217 }, | 199 }, |
| 218 'gclient_apply_config': ['android'], | 200 'gclient_apply_config': ['android'], |
| 219 'should_use_mb': True, | |
| 220 }, | 201 }, |
| 221 'android_chromium_gn_compile_dbg': { | 202 'android_chromium_gn_compile_dbg': { |
| 222 'chromium_apply_config': ['gn_minimal_symbols'], | 203 'chromium_apply_config': ['gn_minimal_symbols'], |
| 223 'chromium_config_kwargs': { | 204 'chromium_config_kwargs': { |
| 224 'BUILD_CONFIG': 'Debug', | 205 'BUILD_CONFIG': 'Debug', |
| 225 'TARGET_PLATFORM': 'android', | 206 'TARGET_PLATFORM': 'android', |
| 226 'TARGET_ARCH': 'arm', | 207 'TARGET_ARCH': 'arm', |
| 227 }, | 208 }, |
| 228 'gclient_apply_config': ['android'], | 209 'gclient_apply_config': ['android'], |
| 229 'should_use_mb': True, | |
| 230 }, | 210 }, |
| 231 'linux_chromium_gn_rel': { | 211 'linux_chromium_gn_rel': { |
| 232 'chromium_config_kwargs': { | 212 'chromium_config_kwargs': { |
| 233 'BUILD_CONFIG': 'Release', | 213 'BUILD_CONFIG': 'Release', |
| 234 'TARGET_PLATFORM': 'linux', | 214 'TARGET_PLATFORM': 'linux', |
| 235 'TARGET_BITS': 64, | 215 'TARGET_BITS': 64, |
| 236 }, | 216 }, |
| 237 'should_run_tests': True, | 217 'should_run_tests': True, |
| 238 'should_use_mb': True, | |
| 239 }, | 218 }, |
| 240 'linux_chromium_gn_dbg': { | 219 'linux_chromium_gn_dbg': { |
| 241 'chromium_apply_config': ['gn_component_build'], | 220 'chromium_apply_config': ['gn_component_build'], |
| 242 'chromium_config_kwargs': { | 221 'chromium_config_kwargs': { |
| 243 'BUILD_CONFIG': 'Debug', | 222 'BUILD_CONFIG': 'Debug', |
| 244 'TARGET_PLATFORM': 'linux', | 223 'TARGET_PLATFORM': 'linux', |
| 245 'TARGET_BITS': 64, | 224 'TARGET_BITS': 64, |
| 246 }, | 225 }, |
| 247 'should_use_mb': True, | |
| 248 }, | 226 }, |
| 249 'linux_chromium_gn_chromeos_rel': { | 227 'linux_chromium_gn_chromeos_rel': { |
| 250 'chromium_config_kwargs': { | 228 'chromium_config_kwargs': { |
| 251 'BUILD_CONFIG': 'Release', | 229 'BUILD_CONFIG': 'Release', |
| 252 'TARGET_PLATFORM': 'chromeos', | 230 'TARGET_PLATFORM': 'chromeos', |
| 253 }, | 231 }, |
| 254 'should_use_mb': True, | |
| 255 }, | 232 }, |
| 256 'linux_chromium_gn_chromeos_dbg': { | 233 'linux_chromium_gn_chromeos_dbg': { |
| 257 'chromium_apply_config': ['gn_component_build'], | 234 'chromium_apply_config': ['gn_component_build'], |
| 258 'chromium_config_kwargs': { | 235 'chromium_config_kwargs': { |
| 259 'BUILD_CONFIG': 'Debug', | 236 'BUILD_CONFIG': 'Debug', |
| 260 'TARGET_PLATFORM': 'chromeos', | 237 'TARGET_PLATFORM': 'chromeos', |
| 261 }, | 238 }, |
| 262 'should_use_mb': True, | |
| 263 }, | 239 }, |
| 264 }, | 240 }, |
| 265 }, | 241 }, |
| 266 'tryserver.chromium.mac': { | 242 'tryserver.chromium.mac': { |
| 267 'builders': { | 243 'builders': { |
| 268 'mac_chromium_gn_dbg': { | 244 'mac_chromium_gn_dbg': { |
| 269 'chromium_config_kwargs': { | 245 'chromium_config_kwargs': { |
| 270 'BUILD_CONFIG': 'Debug', | 246 'BUILD_CONFIG': 'Debug', |
| 271 'TARGET_PLATFORM': 'mac', | 247 'TARGET_PLATFORM': 'mac', |
| 272 }, | 248 }, |
| 273 'should_use_mb': True, | |
| 274 }, | 249 }, |
| 275 'mac_chromium_gn_rel': { | 250 'mac_chromium_gn_rel': { |
| 276 'chromium_config_kwargs': { | 251 'chromium_config_kwargs': { |
| 277 'BUILD_CONFIG': 'Release', | 252 'BUILD_CONFIG': 'Release', |
| 278 'TARGET_PLATFORM': 'mac', | 253 'TARGET_PLATFORM': 'mac', |
| 279 }, | 254 }, |
| 280 'should_use_mb': True, | |
| 281 }, | 255 }, |
| 282 }, | 256 }, |
| 283 }, | 257 }, |
| 284 'tryserver.chromium.win': { | 258 'tryserver.chromium.win': { |
| 285 'builders': { | 259 'builders': { |
| 286 'win8_chromium_gn_dbg': { | 260 'win8_chromium_gn_dbg': { |
| 287 'chromium_apply_config': ['gn_minimal_symbols'], | 261 'chromium_apply_config': ['gn_minimal_symbols'], |
| 288 'chromium_config_kwargs': { | 262 'chromium_config_kwargs': { |
| 289 'BUILD_CONFIG': 'Debug', | 263 'BUILD_CONFIG': 'Debug', |
| 290 'TARGET_PLATFORM': 'win', | 264 'TARGET_PLATFORM': 'win', |
| 291 'TARGET_BITS': 32, | 265 'TARGET_BITS': 32, |
| 292 }, | 266 }, |
| 293 'should_use_mb': True, | |
| 294 }, | 267 }, |
| 295 'win8_chromium_gn_rel': { | 268 'win8_chromium_gn_rel': { |
| 296 'chromium_apply_config': ['gn_minimal_symbols'], | 269 'chromium_apply_config': ['gn_minimal_symbols'], |
| 297 'chromium_config_kwargs': { | 270 'chromium_config_kwargs': { |
| 298 'BUILD_CONFIG': 'Release', | 271 'BUILD_CONFIG': 'Release', |
| 299 'TARGET_PLATFORM': 'win', | 272 'TARGET_PLATFORM': 'win', |
| 300 'TARGET_BITS': 32, | 273 'TARGET_BITS': 32, |
| 301 }, | 274 }, |
| 302 'should_use_mb': True, | |
| 303 }, | 275 }, |
| 304 } | 276 } |
| 305 }, | 277 }, |
| 306 'tryserver.v8': { | 278 'tryserver.v8': { |
| 307 'builders': { | 279 'builders': { |
| 308 'v8_linux_chromium_gn_rel': { | 280 'v8_linux_chromium_gn_rel': { |
| 309 'chromium_config_kwargs': { | 281 'chromium_config_kwargs': { |
| 310 'BUILD_CONFIG': 'Release', | 282 'BUILD_CONFIG': 'Release', |
| 311 'TARGET_PLATFORM': 'linux', | 283 'TARGET_PLATFORM': 'linux', |
| 312 'TARGET_BITS': 64, | 284 'TARGET_BITS': 64, |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 """Returns the compile_targets for all the Tests in |tests|.""" | 347 """Returns the compile_targets for all the Tests in |tests|.""" |
| 376 return sorted(set(x | 348 return sorted(set(x |
| 377 for test in tests | 349 for test in tests |
| 378 for x in test.compile_targets(api))) | 350 for x in test.compile_targets(api))) |
| 379 | 351 |
| 380 | 352 |
| 381 def _GenStepsInternal(api): | 353 def _GenStepsInternal(api): |
| 382 mastername = api.properties.get('mastername') | 354 mastername = api.properties.get('mastername') |
| 383 buildername = api.properties.get('buildername') | 355 buildername = api.properties.get('buildername') |
| 384 bot_config = BUILDERS[mastername]['builders'][buildername] | 356 bot_config = BUILDERS[mastername]['builders'][buildername] |
| 385 should_use_mb = bot_config.get('should_use_mb', False) | |
| 386 is_android = ('Android' in buildername or 'android' in buildername) | 357 is_android = ('Android' in buildername or 'android' in buildername) |
| 387 | 358 |
| 388 if should_use_mb: | 359 api.chromium.configure_bot(BUILDERS, ['gn']) |
| 389 api.chromium.configure_bot(BUILDERS, ['gn']) | 360 bot_update_step = api.bot_update.ensure_checkout( |
| 390 bot_update_step = api.bot_update.ensure_checkout( | 361 force=True, patch_root=bot_config.get('root_override')) |
| 391 force=True, patch_root=bot_config.get('root_override')) | |
| 392 | 362 |
| 393 # because the 'gn' config is applied, we skip running gyp in the | 363 # because the 'gn' config is applied, we skip running gyp in the |
| 394 # the runhooks step. | 364 # the runhooks step. |
| 395 api.chromium.runhooks() | 365 api.chromium.runhooks() |
| 396 | 366 |
| 397 api.chromium.run_mb(mastername, buildername, use_goma=True) | 367 api.chromium.run_mb(mastername, buildername, use_goma=True) |
| 398 | 368 |
| 399 # TODO(dpranke): Unify this with the logic in the chromium_trybot and | 369 # TODO(dpranke): Unify this with the logic in the chromium_trybot and |
| 400 # chromium recipes so that we can actually run the tests as well | 370 # chromium recipes so that we can actually run the tests as well |
| 401 # and deapply patches and retry as need be. | 371 # and deapply patches and retry as need be. |
| 402 test_spec_file = '%s.json' % mastername | 372 test_spec_file = '%s.json' % mastername |
| 403 test_spec = api.chromium_tests.read_test_spec(api, test_spec_file) | 373 test_spec = api.chromium_tests.read_test_spec(api, test_spec_file) |
| 404 tests = list(api.chromium.steps.generate_gtest(api, mastername, | 374 tests = list(api.chromium.steps.generate_gtest(api, mastername, |
| 405 buildername, test_spec)) | 375 buildername, test_spec)) |
| 406 additional_compile_targets = test_spec.get(buildername, {}).get( | 376 additional_compile_targets = test_spec.get(buildername, {}).get( |
| 407 'additional_compile_targets', | 377 'additional_compile_targets', |
| 408 ['chrome_shell_apk' if is_android else 'all']) | 378 ['chrome_shell_apk' if is_android else 'all']) |
| 409 | 379 |
| 410 if api.tryserver.is_tryserver: | 380 if api.tryserver.is_tryserver: |
| 411 affected_files = api.tryserver.get_files_affected_by_patch() | 381 affected_files = api.tryserver.get_files_affected_by_patch() |
| 412 | 382 |
| 413 test_compile_targets = all_compile_targets(api, tests) | 383 test_compile_targets = all_compile_targets(api, tests) |
| 414 | 384 |
| 415 requires_compile, _, compile_targets = \ | 385 requires_compile, _, compile_targets = \ |
| 416 api.chromium_tests.analyze( | 386 api.chromium_tests.analyze( |
| 417 affected_files, | 387 affected_files, |
| 418 test_compile_targets + additional_compile_targets, | 388 test_compile_targets + additional_compile_targets, |
| 419 test_compile_targets, | 389 test_compile_targets, |
| 420 'trybot_analyze_config.json', | 390 'trybot_analyze_config.json', |
| 421 use_mb=True, | 391 use_mb=True, |
| 422 build_output_dir='//out/%s' % api.chromium.c.build_config_fs) | 392 build_output_dir='//out/%s' % api.chromium.c.build_config_fs) |
| 423 if requires_compile: | 393 if requires_compile: |
| 424 api.chromium.compile(compile_targets) | 394 api.chromium.compile(compile_targets) |
| 425 | 395 |
| 426 else: | |
| 427 api.chromium.compile(all_compile_targets(api, tests) + | |
| 428 additional_compile_targets) | |
| 429 else: | 396 else: |
| 430 api.chromium.configure_bot(BUILDERS, ['gn']) | 397 api.chromium.compile(all_compile_targets(api, tests) + |
| 431 api.bot_update.ensure_checkout( | 398 additional_compile_targets) |
| 432 force=True, patch_root=bot_config.get('root_override')) | |
| 433 api.chromium.runhooks() | |
| 434 api.chromium.run_gn(use_goma=True) | |
| 435 | |
| 436 # crbug.com/451227 - building 'all' on android builds too many | |
| 437 # things. Really we should be building the 'default' target | |
| 438 # on all platforms but that isn't properly defined yet. | |
| 439 if is_android: | |
| 440 targets = ['chrome_shell_apk'] | |
| 441 else: | |
| 442 targets = ['all'] | |
| 443 api.chromium.compile(targets) | |
| 444 | 399 |
| 445 # TODO(dpranke): Ensure that every bot runs w/ --check, then make | 400 # TODO(dpranke): Ensure that every bot runs w/ --check, then make |
| 446 # it be on by default. | 401 # it be on by default. |
| 447 if bot_config.get('should_run_gn_check', True): | 402 if bot_config.get('should_run_gn_check', True): |
| 448 api.chromium.run_gn_check() | 403 api.chromium.run_gn_check() |
| 449 | 404 |
| 450 if bot_config.get('should_run_gn_gyp_compare', False): | 405 if bot_config.get('should_run_gn_gyp_compare', False): |
| 451 api.chromium.run_gn_compare() | 406 api.chromium.run_gn_compare() |
| 452 | 407 |
| 453 if should_use_mb: | 408 if tests and bot_config.get('should_run_tests', False): |
| 454 if tests and bot_config.get('should_run_tests', False): | 409 if api.tryserver.is_tryserver: |
| 455 if api.tryserver.is_tryserver: | 410 api.chromium_tests.run_tests_and_deapply_as_needed( |
| 456 api.chromium_tests.run_tests_and_deapply_as_needed( | 411 mastername, api, tests, bot_update_step) |
| 457 mastername, api, tests, bot_update_step) | 412 else: |
| 458 else: | 413 api.chromium_tests.configure_swarming('chromium', precommit=False, |
| 459 api.chromium_tests.configure_swarming('chromium', precommit=False, | 414 mastername=mastername) |
| 460 mastername=mastername) | 415 test_runner = api.chromium_tests.create_test_runner(api, tests) |
| 461 test_runner = api.chromium_tests.create_test_runner(api, tests) | 416 with api.chromium_tests.wrap_chromium_tests(mastername): |
| 462 with api.chromium_tests.wrap_chromium_tests(mastername): | 417 test_runner() |
| 463 test_runner() | |
| 464 else: | |
| 465 if not is_android: | |
| 466 api.chromium.runtest('gn_unittests') | |
| 467 | 418 |
| 468 | 419 |
| 469 def GenSteps(api): | 420 def GenSteps(api): |
| 470 with api.tryserver.set_failure_hash(): | 421 with api.tryserver.set_failure_hash(): |
| 471 return _GenStepsInternal(api) | 422 return _GenStepsInternal(api) |
| 472 | 423 |
| 473 | 424 |
| 474 def GenTests(api): | 425 def GenTests(api): |
| 475 overrides = {} | 426 overrides = {} |
| 476 for mastername, master_dict in BUILDERS.items(): | 427 for mastername, master_dict in BUILDERS.items(): |
| 477 for buildername, builder_dict in master_dict['builders'].items(): | 428 for buildername in master_dict['builders']: |
| 478 if builder_dict.get('should_use_mb', False): | 429 overrides.setdefault(mastername, {}) |
| 479 overrides.setdefault(mastername, {}) | 430 overrides[mastername][buildername] = ( |
| 480 overrides[mastername][buildername] = ( | 431 api.override_step_data( |
| 481 api.override_step_data( | 432 'read test spec', |
| 482 'read test spec', | 433 api.json.output({ |
| 483 api.json.output({ | 434 buildername: { |
| 484 buildername: { | 435 'gtest_tests': ['base_unittests'], |
| 485 'gtest_tests': ['base_unittests'], | 436 }, |
| 486 }, | 437 }))) |
| 487 }))) | |
| 488 | 438 |
| 489 if 'tryserver' in mastername: | 439 if 'tryserver' in mastername: |
| 490 overrides[mastername][buildername] += api.override_step_data( | 440 overrides[mastername][buildername] += api.override_step_data( |
| 491 'analyze', | 441 'analyze', |
| 492 api.json.output({ | 442 api.json.output({ |
| 493 'status': 'Found dependency', | 443 'status': 'Found dependency', |
| 494 'targets': ['base_unittests'], | 444 'targets': ['base_unittests'], |
| 495 'build_targets': ['base_unittests'], | 445 'build_targets': ['base_unittests'], |
| 496 })) | 446 })) |
| 497 | 447 |
| 498 for test in api.chromium.gen_tests_for_builders(BUILDERS, overrides): | 448 for test in api.chromium.gen_tests_for_builders(BUILDERS, overrides): |
| 499 yield test | 449 yield test |
| 500 | 450 |
| 501 yield ( | 451 yield ( |
| 502 api.test('compile_failure') + | 452 api.test('compile_failure') + |
| 503 api.platform.name('linux') + | 453 api.platform.name('linux') + |
| 504 api.properties.tryserver( | 454 api.properties.tryserver( |
| 505 buildername='linux_chromium_gn_rel', | 455 buildername='linux_chromium_gn_rel', |
| 506 mastername='tryserver.chromium.linux') + | 456 mastername='tryserver.chromium.linux') + |
| 507 api.step_data('compile', retcode=1) + | 457 api.step_data('compile', retcode=1) + |
| 508 overrides['tryserver.chromium.linux']['linux_chromium_gn_rel'] | 458 overrides['tryserver.chromium.linux']['linux_chromium_gn_rel'] |
| 509 ) | 459 ) |
| 510 | 460 |
| 511 yield ( | 461 yield ( |
| 512 api.test('use_v8_patch_on_chromium_gn_trybot') + | 462 api.test('use_v8_patch_on_chromium_gn_trybot') + |
| 513 api.platform.name('linux') + | 463 api.platform.name('linux') + |
| 514 api.properties.tryserver( | 464 api.properties.tryserver( |
| 515 buildername='linux_chromium_gn_rel', | 465 buildername='linux_chromium_gn_rel', |
| 516 mastername='tryserver.chromium.linux', | 466 mastername='tryserver.chromium.linux', |
| 517 patch_project='v8') + | 467 patch_project='v8') + |
| 518 overrides['tryserver.chromium.linux']['linux_chromium_gn_rel'] | 468 overrides['tryserver.chromium.linux']['linux_chromium_gn_rel'] |
| 519 ) | 469 ) |
| OLD | NEW |