| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 """A special run hooks shell command to allow modifying its environment | 165 """A special run hooks shell command to allow modifying its environment |
| 166 right before it starts up.""" | 166 right before it starts up.""" |
| 167 def setupEnvironment(self, cmd): | 167 def setupEnvironment(self, cmd): |
| 168 test_filters = GetTestfilter(self) | 168 test_filters = GetTestfilter(self) |
| 169 run_default_swarm_tests = GetProp(self, 'run_default_swarm_tests', []) | 169 run_default_swarm_tests = GetProp(self, 'run_default_swarm_tests', []) |
| 170 # If swarm tests are present ensure that the .isolated and the sha-1 of its | 170 # If swarm tests are present ensure that the .isolated and the sha-1 of its |
| 171 # content, as required by the swarm steps, is generated. | 171 # content, as required by the swarm steps, is generated. |
| 172 if BuildIsolatedFiles(test_filters, run_default_swarm_tests): | 172 if BuildIsolatedFiles(test_filters, run_default_swarm_tests): |
| 173 environ = cmd.args.get('env', {}).copy() | 173 environ = cmd.args.get('env', {}).copy() |
| 174 environ.setdefault('GYP_DEFINES', '') | 174 environ.setdefault('GYP_DEFINES', '') |
| 175 environ['GYP_DEFINES'] += ' test_isolation_mode=hashtable' | 175 environ['GYP_DEFINES'] += ' test_isolation_mode=archive' |
| 176 environ['GYP_DEFINES'] += (' test_isolation_outdir=' + | 176 environ['GYP_DEFINES'] += (' test_isolation_outdir=' + |
| 177 config.Master.swarm_hashtable_server_internal) | 177 config.Master.swarm_hashtable_server_internal) |
| 178 | 178 |
| 179 cmd.args['env'] = environ | 179 cmd.args['env'] = environ |
| 180 | 180 |
| 181 shell.ShellCommand.setupEnvironment(self, cmd) | 181 shell.ShellCommand.setupEnvironment(self, cmd) |
| 182 | 182 |
| 183 | 183 |
| 184 class CalculateIsolatedSha1s(shell.ShellCommand): | 184 class CalculateIsolatedSha1s(shell.ShellCommand): |
| 185 """Build step that prints out the sha-1 of each .isolated file found. | 185 """Build step that prints out the sha-1 of each .isolated file found. |
| (...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1318 | 1318 |
| 1319 def commandComplete(self, cmd): | 1319 def commandComplete(self, cmd): |
| 1320 out = cmd.logs['stdio'].getText() | 1320 out = cmd.logs['stdio'].getText() |
| 1321 build_properties = re.findall('BUILD_PROPERTY ([^=]*)=(.*)', out) | 1321 build_properties = re.findall('BUILD_PROPERTY ([^=]*)=(.*)', out) |
| 1322 for propname, value in build_properties: | 1322 for propname, value in build_properties: |
| 1323 # findall can return strings containing CR characters, remove with strip. | 1323 # findall can return strings containing CR characters, remove with strip. |
| 1324 self.build.setProperty(propname, value.strip(), 'Step') | 1324 self.build.setProperty(propname, value.strip(), 'Step') |
| 1325 | 1325 |
| 1326 def getText(self, cmd, results): | 1326 def getText(self, cmd, results): |
| 1327 return self.describe(True) + self.messages | 1327 return self.describe(True) + self.messages |
| OLD | NEW |