| 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 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1066 'tools', 'mb', 'mb_config.pyl') | 1066 'tools', 'mb', 'mb_config.pyl') |
| 1067 | 1067 |
| 1068 cmd = [self._python, self._mb_tool, 'gen', | 1068 cmd = [self._python, self._mb_tool, 'gen', |
| 1069 '-m', WithProperties('%(mastername)s'), | 1069 '-m', WithProperties('%(mastername)s'), |
| 1070 '-b', WithProperties('%(buildername)s'), | 1070 '-b', WithProperties('%(buildername)s'), |
| 1071 '--config-file', config_file_path] | 1071 '--config-file', config_file_path] |
| 1072 | 1072 |
| 1073 if '--compiler=goma' in options or '--compiler=goma-clang' in options: | 1073 if '--compiler=goma' in options or '--compiler=goma-clang' in options: |
| 1074 cmd += ['--goma-dir', self.PathJoin('..', '..', '..', '..', 'goma')] | 1074 cmd += ['--goma-dir', self.PathJoin('..', '..', '..', '..', 'goma')] |
| 1075 | 1075 |
| 1076 # TODO(crbug.com/572694) - I'm not sure why target isn't getting honored | 1076 assert(target is not None) |
| 1077 # here on the chromium.memory.full builders, but the only non-recipe | |
| 1078 # builders left on this waterfall are Release, so this is a safe default. | |
| 1079 # target does get passed correctly on the official builders (which are | |
| 1080 # the other ones still not on recipes). It's probably not worth tracking | |
| 1081 # down what's going on otherwise (better to switch to recipes). | |
| 1082 target = target or 'Release' | |
| 1083 | |
| 1084 cmd += ['//out/%s' % target] | 1077 cmd += ['//out/%s' % target] |
| 1085 | 1078 |
| 1086 self._factory.addStep( | 1079 self._factory.addStep( |
| 1087 shell.ShellCommand, | 1080 shell.ShellCommand, |
| 1088 haltOnFailure=True, | 1081 haltOnFailure=True, |
| 1089 name='generate_build_files', | 1082 name='generate_build_files', |
| 1090 description='generate build files', | 1083 description='generate build files', |
| 1091 env=env, | 1084 env=env, |
| 1092 locks=[self.slave_exclusive_lock], | 1085 locks=[self.slave_exclusive_lock], |
| 1093 timeout=timeout, | 1086 timeout=timeout, |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1374 | 1367 |
| 1375 def commandComplete(self, cmd): | 1368 def commandComplete(self, cmd): |
| 1376 out = cmd.logs['stdio'].getText() | 1369 out = cmd.logs['stdio'].getText() |
| 1377 build_properties = re.findall('BUILD_PROPERTY ([^=]*)=(.*)', out) | 1370 build_properties = re.findall('BUILD_PROPERTY ([^=]*)=(.*)', out) |
| 1378 for propname, value in build_properties: | 1371 for propname, value in build_properties: |
| 1379 # findall can return strings containing CR characters, remove with strip. | 1372 # findall can return strings containing CR characters, remove with strip. |
| 1380 self.build.setProperty(propname, value.strip(), 'Step') | 1373 self.build.setProperty(propname, value.strip(), 'Step') |
| 1381 | 1374 |
| 1382 def getText(self, cmd, results): | 1375 def getText(self, cmd, results): |
| 1383 return self.describe(True) + self.messages | 1376 return self.describe(True) + self.messages |
| OLD | NEW |