Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(583)

Side by Side Diff: scripts/master/factory/chromium_factory.py

Issue 14440005: Rework how bots get the version of Blink. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: fix typo in devtools master.cfg Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « scripts/master/chromium_step.py ('k') | scripts/master/factory/commands.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 """Utility class to build the chromium master BuildFactory's. 5 """Utility class to build the chromium master BuildFactory's.
6 6
7 Based on gclient_factory.py and adds chromium-specific steps.""" 7 Based on gclient_factory.py and adds chromium-specific steps."""
8 8
9 import os 9 import os
10 import re 10 import re
(...skipping 25 matching lines...) Expand all
36 36
37 DEFAULT_TARGET_PLATFORM = config.Master.default_platform 37 DEFAULT_TARGET_PLATFORM = config.Master.default_platform
38 38
39 MEMORY_TOOLS_GYP_DEFINES = 'build_for_tool=memcheck' 39 MEMORY_TOOLS_GYP_DEFINES = 'build_for_tool=memcheck'
40 40
41 # gclient custom vars 41 # gclient custom vars
42 CUSTOM_VARS_GOOGLECODE_URL = ('googlecode_url', config.Master.googlecode_url) 42 CUSTOM_VARS_GOOGLECODE_URL = ('googlecode_url', config.Master.googlecode_url)
43 CUSTOM_VARS_SOURCEFORGE_URL = ('sourceforge_url', 43 CUSTOM_VARS_SOURCEFORGE_URL = ('sourceforge_url',
44 config.Master.sourceforge_url) 44 config.Master.sourceforge_url)
45 CUSTOM_VARS_WEBKIT_MIRROR = ('webkit_trunk', config.Master.webkit_trunk_url) 45 CUSTOM_VARS_WEBKIT_MIRROR = ('webkit_trunk', config.Master.webkit_trunk_url)
46 # $$WK_REV$$ below will be substituted with the revision that triggered the
47 # build in chromium_step.py@GClient.startVC. Use this only with builds
48 # triggered by a webkit poller.
49 CUSTOM_VARS_WEBKIT_LATEST = [('webkit_revision', '$$WK_REV$$')]
50 CUSTOM_VARS_NACL_TRUNK_URL = ('nacl_trunk', config.Master.nacl_trunk_url) 46 CUSTOM_VARS_NACL_TRUNK_URL = ('nacl_trunk', config.Master.nacl_trunk_url)
51 # safe sync urls 47 # safe sync urls
52 SAFESYNC_URL_CHROMIUM = 'http://chromium-status.appspot.com/lkgr' 48 SAFESYNC_URL_CHROMIUM = 'http://chromium-status.appspot.com/lkgr'
53 49
54 # gclient additional custom deps 50 # gclient additional custom deps
55 CUSTOM_DEPS_V8_LATEST = ('src/v8', 51 CUSTOM_DEPS_V8_LATEST = ('src/v8',
56 'http://v8.googlecode.com/svn/branches/bleeding_edge') 52 'http://v8.googlecode.com/svn/branches/bleeding_edge')
57 CUSTOM_DEPS_WEBRTC_TRUNK = ('src/third_party/webrtc', 53 CUSTOM_DEPS_WEBRTC_TRUNK = ('src/third_party/webrtc',
58 config.Master.webrtc_url + '/trunk/webrtc') 54 config.Master.webrtc_url + '/trunk/webrtc')
59 CUSTOM_DEPS_WEBRTC_STABLE = ('src/third_party/webrtc', 55 CUSTOM_DEPS_WEBRTC_STABLE = ('src/third_party/webrtc',
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 'msvs_error_on_missing_sources=' not in gyp_generator_flags): 878 'msvs_error_on_missing_sources=' not in gyp_generator_flags):
883 gclient_env['GYP_GENERATOR_FLAGS'] = ( 879 gclient_env['GYP_GENERATOR_FLAGS'] = (
884 gyp_generator_flags + ' msvs_error_on_missing_sources=1') 880 gyp_generator_flags + ' msvs_error_on_missing_sources=1')
885 881
886 def ChromiumFactory(self, target='Release', clobber=False, tests=None, 882 def ChromiumFactory(self, target='Release', clobber=False, tests=None,
887 mode=None, slave_type='BuilderTester', 883 mode=None, slave_type='BuilderTester',
888 options=None, compile_timeout=1200, build_url=None, 884 options=None, compile_timeout=1200, build_url=None,
889 project=None, factory_properties=None, gclient_deps=None, 885 project=None, factory_properties=None, gclient_deps=None,
890 enable_swarm_tests=False): 886 enable_swarm_tests=False):
891 factory_properties = (factory_properties or {}).copy() 887 factory_properties = (factory_properties or {}).copy()
888
889 # Default to the configuration of Blink appropriate for Chromium patches.
890 factory_properties.setdefault('blink_config', 'chromium')
891 if factory_properties['blink_config'] == 'blink':
892 # This will let builders embed their webkit revision in their output
893 # filename and will let testers look for zip files containing a webkit
894 # revision in their filename. For this to work correctly, the testers
895 # need to be on a Triggerable that's activated by their builder.
896 factory_properties.setdefault('webkit_dir', 'third_party/WebKit/Source')
897
892 factory_properties['gclient_env'] = \ 898 factory_properties['gclient_env'] = \
893 factory_properties.get('gclient_env', {}).copy() 899 factory_properties.get('gclient_env', {}).copy()
894 # Defaults gyp to VS2010. 900 # Defaults gyp to VS2010.
895 if self._target_platform == 'win32': 901 if self._target_platform == 'win32':
896 factory_properties['gclient_env'].setdefault('GYP_MSVS_VERSION', '2010') 902 factory_properties['gclient_env'].setdefault('GYP_MSVS_VERSION', '2010')
897 tests = tests or [] 903 tests = tests or []
898 904
899 # This permits simpler WebKit specific try jobs.
900 if slave_type == 'Trybot':
901 self._solutions[0].custom_vars_list.append(
902 ('webkit_revision', '$$WK_TRY_REV$$'))
903
904 if factory_properties.get('needs_valgrind'): 905 if factory_properties.get('needs_valgrind'):
905 self._solutions[0].custom_deps_list = [self.CUSTOM_DEPS_VALGRIND] 906 self._solutions[0].custom_deps_list = [self.CUSTOM_DEPS_VALGRIND]
906 elif factory_properties.get('needs_tsan_win'): 907 elif factory_properties.get('needs_tsan_win'):
907 self._solutions[0].custom_deps_list = [self.CUSTOM_DEPS_TSAN_WIN] 908 self._solutions[0].custom_deps_list = [self.CUSTOM_DEPS_TSAN_WIN]
908 elif factory_properties.get('needs_drmemory'): 909 elif factory_properties.get('needs_drmemory'):
909 if 'drmemory.DEPS' not in [s.name for s in self._solutions]: 910 if 'drmemory.DEPS' not in [s.name for s in self._solutions]:
910 self._solutions.append(gclient_factory.GClientSolution( 911 self._solutions.append(gclient_factory.GClientSolution(
911 config.Master.trunk_url + 912 config.Master.trunk_url +
912 '/deps/third_party/drmemory/drmemory.DEPS', 913 '/deps/third_party/drmemory/drmemory.DEPS',
913 'drmemory.DEPS')) 914 'drmemory.DEPS'))
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 v for v in self._solutions[0].custom_vars_list if v[0] != 'nacl_trunk' 1132 v for v in self._solutions[0].custom_vars_list if v[0] != 'nacl_trunk'
1132 ] 1133 ]
1133 self._solutions[0].custom_vars_list.extend(self.CUSTOM_VARS_NACL_LATEST) 1134 self._solutions[0].custom_vars_list.extend(self.CUSTOM_VARS_NACL_LATEST)
1134 self._solutions[0].safesync_url = self.SAFESYNC_URL_CHROMIUM 1135 self._solutions[0].safesync_url = self.SAFESYNC_URL_CHROMIUM
1135 if factory_properties.get('needs_nacl_valgrind'): 1136 if factory_properties.get('needs_nacl_valgrind'):
1136 self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_NACL_VALGRIND) 1137 self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_NACL_VALGRIND)
1137 return self.ChromiumFactory(target, clobber, tests, mode, slave_type, 1138 return self.ChromiumFactory(target, clobber, tests, mode, slave_type,
1138 options, compile_timeout, build_url, project, 1139 options, compile_timeout, build_url, project,
1139 factory_properties) 1140 factory_properties)
1140 1141
1141 def _InitWebkitLatestFactorySettings(self, factory_properties):
1142 self._solutions[0].custom_vars_list.extend(self.CUSTOM_VARS_WEBKIT_LATEST)
1143
1144 # This will let builders embed their webkit revision in their output
1145 # filename and will let testers look for zip files containing a webkit
1146 # revision in their filename. For this to work correctly, the testers
1147 # need to be on a Triggerable that's activated by their builder.
1148 factory_properties.setdefault('webkit_dir', 'third_party/WebKit/Source')
1149
1150 def ChromiumWebkitLatestAnnotationFactory(self, annotation_script,
1151 branch='master', target='Release',
1152 slave_type='AnnotatedBuilderTester',
1153 clobber=False, compile_timeout=6000,
1154 project=None,
1155 factory_properties=None,
1156 tests=None):
1157 factory_properties = factory_properties or {}
1158 self._InitWebkitLatestFactorySettings(factory_properties)
1159
1160 return self.ChromiumAnnotationFactory(
1161 annotation_script=annotation_script, branch=branch, target=target,
1162 slave_type=slave_type, clobber=clobber, compile_timeout=compile_timeout,
1163 project=project, factory_properties=factory_properties, tests=tests)
1164
1165 def ChromiumWebkitLatestFactory(self, target='Release', clobber=False,
1166 tests=None, mode=None,
1167 slave_type='BuilderTester', options=None,
1168 compile_timeout=1200, build_url=None,
1169 project=None, factory_properties=None):
1170 factory_properties = factory_properties or {}
1171 self._InitWebkitLatestFactorySettings(factory_properties)
1172
1173 return self.ChromiumFactory(target, clobber, tests, mode, slave_type,
1174 options, compile_timeout, build_url, project,
1175 factory_properties)
1176
1177 def ChromiumOSWebkitLatestFactory(self, target='Release', clobber=False,
1178 tests=None, mode=None,
1179 slave_type='BuilderTester', options=None,
1180 compile_timeout=1200, build_url=None,
1181 project=None, factory_properties=None):
1182 # Make sure the solution is not already there.
1183 if 'cros_deps' not in [s.name for s in self._solutions]:
1184 self._solutions.append(gclient_factory.GClientSolution(
1185 config.Master.trunk_url + '/src/tools/cros.DEPS', name='cros_deps'))
1186
1187 return self.ChromiumWebkitLatestFactory(target, clobber, tests, mode,
1188 slave_type, options,
1189 compile_timeout, build_url,
1190 project, factory_properties)
1191
1192 def ChromiumGYPLatestFactory(self, target='Debug', clobber=False, tests=None, 1142 def ChromiumGYPLatestFactory(self, target='Debug', clobber=False, tests=None,
1193 mode=None, slave_type='BuilderTester', 1143 mode=None, slave_type='BuilderTester',
1194 options=None, compile_timeout=1200, 1144 options=None, compile_timeout=1200,
1195 build_url=None, project=None, 1145 build_url=None, project=None,
1196 factory_properties=None, gyp_format=None): 1146 factory_properties=None, gyp_format=None):
1197 1147
1198 if tests is None: 1148 if tests is None:
1199 tests = ['unit'] 1149 tests = ['unit']
1200 1150
1201 if gyp_format: 1151 if gyp_format:
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
1360 build_dir=web_build_dir) 1310 build_dir=web_build_dir)
1361 chromium_cmd_obj.AddChromebotServer(factory_properties) 1311 chromium_cmd_obj.AddChromebotServer(factory_properties)
1362 chromium_cmd_obj.AddReliabilityTests(client_os) 1312 chromium_cmd_obj.AddReliabilityTests(client_os)
1363 elif slave_type == 'ChromebotClient': 1313 elif slave_type == 'ChromebotClient':
1364 chromium_cmd_obj.AddGetBuildForChromebot(client_os, 1314 chromium_cmd_obj.AddGetBuildForChromebot(client_os,
1365 extract=True, 1315 extract=True,
1366 build_url=build_url) 1316 build_url=build_url)
1367 chromium_cmd_obj.AddChromebotClient(factory_properties) 1317 chromium_cmd_obj.AddChromebotClient(factory_properties)
1368 1318
1369 return factory 1319 return factory
OLDNEW
« no previous file with comments | « scripts/master/chromium_step.py ('k') | scripts/master/factory/commands.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698