| 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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 | 342 |
| 343 self._update_nacl_sdk_tool = self.PathJoin(self._script_dir, | 343 self._update_nacl_sdk_tool = self.PathJoin(self._script_dir, |
| 344 'update_nacl_sdk.py') | 344 'update_nacl_sdk.py') |
| 345 | 345 |
| 346 # chrome_staging directory, relative to the build directory. | 346 # chrome_staging directory, relative to the build directory. |
| 347 self._staging_dir = self.PathJoin('..', 'chrome_staging') | 347 self._staging_dir = self.PathJoin('..', 'chrome_staging') |
| 348 | 348 |
| 349 # scripts in scripts/slave | 349 # scripts in scripts/slave |
| 350 self._runbuild = self.PathJoin(self._script_dir, 'runbuild.py') | 350 self._runbuild = self.PathJoin(self._script_dir, 'runbuild.py') |
| 351 | 351 |
| 352 @property |
| 353 def python(self): |
| 354 return self._python |
| 355 |
| 356 @property |
| 357 def script_dir(self): |
| 358 return self._script_dir |
| 359 |
| 352 # Util methods. | 360 # Util methods. |
| 353 def GetExecutableName(self, executable): | 361 def GetExecutableName(self, executable): |
| 354 """The executable name must be executable plus '.exe' on Windows, or else | 362 """The executable name must be executable plus '.exe' on Windows, or else |
| 355 just the test name.""" | 363 just the test name.""" |
| 356 if self._target_platform == 'win32': | 364 if self._target_platform == 'win32': |
| 357 return executable + '.exe' | 365 return executable + '.exe' |
| 358 return executable | 366 return executable |
| 359 | 367 |
| 360 def PathJoin(self, *args): | 368 def PathJoin(self, *args): |
| 361 if self._target_platform == 'win32': | 369 if self._target_platform == 'win32': |
| (...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1361 | 1369 |
| 1362 def commandComplete(self, cmd): | 1370 def commandComplete(self, cmd): |
| 1363 out = cmd.logs['stdio'].getText() | 1371 out = cmd.logs['stdio'].getText() |
| 1364 build_properties = re.findall('BUILD_PROPERTY ([^=]*)=(.*)', out) | 1372 build_properties = re.findall('BUILD_PROPERTY ([^=]*)=(.*)', out) |
| 1365 for propname, value in build_properties: | 1373 for propname, value in build_properties: |
| 1366 # findall can return strings containing CR characters, remove with strip. | 1374 # findall can return strings containing CR characters, remove with strip. |
| 1367 self.build.setProperty(propname, value.strip(), 'Step') | 1375 self.build.setProperty(propname, value.strip(), 'Step') |
| 1368 | 1376 |
| 1369 def getText(self, cmd, results): | 1377 def getText(self, cmd, results): |
| 1370 return self.describe(True) + self.messages | 1378 return self.describe(True) + self.messages |
| OLD | NEW |