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

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

Issue 157073002: Bot update! (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Chromium commands fix Created 6 years, 10 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
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 """Set of utilities to add commands to a buildbot factory (BuildFactory). 5 """Set of utilities to add commands to a buildbot factory (BuildFactory).
6 6
7 All the utility functions to add steps to a build factory here are not 7 All the utility functions to add steps to a build factory here are not
8 project-specific. See the other *_commands.py for project-specific commands. 8 project-specific. See the other *_commands.py for project-specific commands.
9 """ 9 """
10 10
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 """Add a step to force checkout to some state. 971 """Add a step to force checkout to some state.
972 972
973 This is meant to replace all gclient revert/sync steps. 973 This is meant to replace all gclient revert/sync steps.
974 """ 974 """
975 cmd = ['python', self._bot_update_tool, '--specs', gclient_specs] 975 cmd = ['python', self._bot_update_tool, '--specs', gclient_specs]
976 976
977 PROPERTIES = { 977 PROPERTIES = {
978 'root': '%(root:~src)s', 978 'root': '%(root:~src)s',
979 'issue': '%(issue:-)s', 979 'issue': '%(issue:-)s',
980 'patchset': '%(patchset:-)s', 980 'patchset': '%(patchset:-)s',
981 'master': '%(mastername:-)s' 981 'master': '%(mastername:-)s',
982 'revision': '%(revision:-)s',
982 } 983 }
983 984
984 for property_name, property_expr in PROPERTIES.iteritems(): 985 for property_name, property_expr in PROPERTIES.iteritems():
985 property_value = WithProperties(property_expr) 986 property_value = WithProperties(property_expr)
986 if property_value: 987 if property_value:
987 cmd.extend(['--%s' % property_name, property_value]) 988 cmd.extend(['--%s' % property_name, property_value])
988 989
989 if server: 990 if server:
990 cmd.extend(['--server', server]) 991 cmd.extend(['--server', server])
991 992
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1354 1355
1355 def commandComplete(self, cmd): 1356 def commandComplete(self, cmd):
1356 out = cmd.logs['stdio'].getText() 1357 out = cmd.logs['stdio'].getText()
1357 build_properties = re.findall('BUILD_PROPERTY ([^=]*)=(.*)', out) 1358 build_properties = re.findall('BUILD_PROPERTY ([^=]*)=(.*)', out)
1358 for propname, value in build_properties: 1359 for propname, value in build_properties:
1359 # findall can return strings containing CR characters, remove with strip. 1360 # findall can return strings containing CR characters, remove with strip.
1360 self.build.setProperty(propname, value.strip(), 'Step') 1361 self.build.setProperty(propname, value.strip(), 'Step')
1361 1362
1362 def getText(self, cmd, results): 1363 def getText(self, cmd, results):
1363 return self.describe(True) + self.messages 1364 return self.describe(True) + self.messages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698