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

Side by Side Diff: scripts/slave/recipe_modules/gclient/api.py

Issue 75163006: WebRTC Android APK trybot recipe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 1 month 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
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 slave import recipe_api 5 from slave import recipe_api
6 6
7 def jsonish_to_python(spec, is_top=False): 7 def jsonish_to_python(spec, is_top=False):
8 ret = '' 8 ret = ''
9 if is_top: # We're the 'top' level, so treat this dict as a suite. 9 if is_top: # We're the 'top' level, so treat this dict as a suite.
10 ret = '\n'.join( 10 ret = '\n'.join(
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 # alternately sets 'revision' to the chromium revision OR the webkit 86 # alternately sets 'revision' to the chromium revision OR the webkit
87 # revision. This causes gclient to sync to ancient chromium versions 87 # revision. This causes gclient to sync to ancient chromium versions
88 # occasionally, which is bad. Key off of the 'project' build_property 88 # occasionally, which is bad. Key off of the 'project' build_property
89 # which seems to be set uniquely on this master. 89 # which seems to be set uniquely on this master.
90 if self.m.properties.get('project') == 'webkit': 90 if self.m.properties.get('project') == 'webkit':
91 s.revision = 'HEAD' 91 s.revision = 'HEAD'
92 92
93 if s.revision is not None and s.revision != '': 93 if s.revision is not None and s.revision != '':
94 revisions.extend(['--revision', '%s@%s' % (s.name, s.revision)]) 94 revisions.extend(['--revision', '%s@%s' % (s.name, s.revision)])
95 95
96 # HACK(kjellander): Set the revision for the WebRTC Android APK trybots
97 # here since it doesn't seem to exist a nice way to pass that information
98 # into the recipe_modules/webrtc/gclient_config.py.
99 if s.name == 'src/third_party/webrtc':
100 revisions = ['--revision', 'src/third_party/webrtc@%s' %
101 self.m.properties.get('revision')]
iannucci 2013/11/18 18:49:26 whoa! *bzzt* :p (mentioned in chat) why not just
kjellander_chromium 2013/11/20 14:29:16 I agree. I moved it into the recipe.
102
96 def parse_got_revision(step_result): 103 def parse_got_revision(step_result):
97 data = step_result.json.output 104 data = step_result.json.output
98 for path, info in data['solutions'].iteritems(): 105 for path, info in data['solutions'].iteritems():
99 # gclient json paths always end with a slash 106 # gclient json paths always end with a slash
100 path = path.rstrip('/') 107 path = path.rstrip('/')
101 if path in cfg.got_revision_mapping: 108 if path in cfg.got_revision_mapping:
102 propname = cfg.got_revision_mapping[path] 109 propname = cfg.got_revision_mapping[path]
103 step_result.presentation.properties[propname] = info['revision'] 110 step_result.presentation.properties[propname] = info['revision']
104 111
105 if not cfg.GIT_MODE: 112 if not cfg.GIT_MODE:
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 if self.m.properties.get('top_of_tree_blink'): 202 if self.m.properties.get('top_of_tree_blink'):
196 return True 203 return True
197 204
198 # Normalize slashes to take into account possible Windows paths. 205 # Normalize slashes to take into account possible Windows paths.
199 root = self.m.properties.get('root', '').replace('\\', '/').lower() 206 root = self.m.properties.get('root', '').replace('\\', '/').lower()
200 207
201 if root.endswith('third_party/webkit'): 208 if root.endswith('third_party/webkit'):
202 return True 209 return True
203 210
204 return False 211 return False
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698