| OLD | NEW |
| 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 938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 949 | 949 |
| 950 for property_name, property_expr in PROPERTIES.iteritems(): | 950 for property_name, property_expr in PROPERTIES.iteritems(): |
| 951 property_value = WithProperties(property_expr) | 951 property_value = WithProperties(property_expr) |
| 952 if property_value: | 952 if property_value: |
| 953 cmd.extend(['--%s' % property_name, property_value]) | 953 cmd.extend(['--%s' % property_name, property_value]) |
| 954 | 954 |
| 955 if server: | 955 if server: |
| 956 cmd.extend(['--rietveld_server', server]) | 956 cmd.extend(['--rietveld_server', server]) |
| 957 | 957 |
| 958 if revision_mapping: | 958 if revision_mapping: |
| 959 cmd.extend(['--revision-mapping=%s' % json.dumps(revision_mapping)]) | 959 cmd.extend(['--revision_mapping=%s' % json.dumps(revision_mapping)]) |
| 960 | 960 |
| 961 self._factory.addStep( | 961 self._factory.addStep( |
| 962 chromium_step.AnnotatedCommand, | 962 chromium_step.AnnotatedCommand, |
| 963 name='bot_update', | 963 name='bot_update', |
| 964 description='bot_update', | 964 description='bot_update', |
| 965 haltOnFailure=True, | 965 haltOnFailure=True, |
| 966 flunkOnFailure=True, | 966 flunkOnFailure=True, |
| 967 timeout=600, | 967 timeout=600, |
| 968 workdir=self.working_dir, | 968 workdir=self.working_dir, |
| 969 command=cmd) | 969 command=cmd) |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1302 | 1302 |
| 1303 def commandComplete(self, cmd): | 1303 def commandComplete(self, cmd): |
| 1304 out = cmd.logs['stdio'].getText() | 1304 out = cmd.logs['stdio'].getText() |
| 1305 build_properties = re.findall('BUILD_PROPERTY ([^=]*)=(.*)', out) | 1305 build_properties = re.findall('BUILD_PROPERTY ([^=]*)=(.*)', out) |
| 1306 for propname, value in build_properties: | 1306 for propname, value in build_properties: |
| 1307 # findall can return strings containing CR characters, remove with strip. | 1307 # findall can return strings containing CR characters, remove with strip. |
| 1308 self.build.setProperty(propname, value.strip(), 'Step') | 1308 self.build.setProperty(propname, value.strip(), 'Step') |
| 1309 | 1309 |
| 1310 def getText(self, cmd, results): | 1310 def getText(self, cmd, results): |
| 1311 return self.describe(True) + self.messages | 1311 return self.describe(True) + self.messages |
| OLD | NEW |