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. | 5 """Set of utilities to add commands to a buildbot factory. |
6 | 6 |
7 This is based on commands.py and adds chromium-specific commands.""" | 7 This is based on commands.py and adds chromium-specific commands.""" |
8 | 8 |
9 import logging | 9 import logging |
10 import os | 10 import os |
(...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1353 cmd = [self._python, | 1353 cmd = [self._python, |
1354 os.path.join('src', 'tools', 'code_coverage', 'coverage_posix.py'), | 1354 os.path.join('src', 'tools', 'code_coverage', 'coverage_posix.py'), |
1355 '--build-dir', | 1355 '--build-dir', |
1356 self._build_dir, | 1356 self._build_dir, |
1357 '--target', | 1357 '--target', |
1358 self._target, | 1358 self._target, |
1359 '--src_root', | 1359 '--src_root', |
1360 '.', | 1360 '.', |
1361 '--bundles', 'coverage_bundles.py'] | 1361 '--bundles', 'coverage_bundles.py'] |
1362 self.AddTestStep(shell.ShellCommand, 'run_coverage_bundles', cmd) | 1362 self.AddTestStep(shell.ShellCommand, 'run_coverage_bundles', cmd) |
| 1363 # Run only unittests in this step. |
| 1364 cmd = [self._python, |
| 1365 os.path.join('src', 'tools', 'code_coverage', 'coverage_posix.py'), |
| 1366 '--build-dir', |
| 1367 self._build_dir, |
| 1368 '--target', |
| 1369 self._target, |
| 1370 '--src_root', |
| 1371 '.', |
| 1372 '--all_unittests', 'True'] |
| 1373 self.AddTestStep(shell.ShellCommand, 'run_unittests_only', cmd) |
1363 | 1374 |
1364 def AddProcessCoverage(self, factory_properties=None): | 1375 def AddProcessCoverage(self, factory_properties=None): |
1365 factory_properties = factory_properties or {} | 1376 factory_properties = factory_properties or {} |
1366 c = self.GetPerfStepClass(factory_properties, 'coverage', | 1377 c = self.GetPerfStepClass(factory_properties, 'coverage', |
1367 process_log.GraphingLogProcessor) | 1378 process_log.GraphingLogProcessor) |
1368 | 1379 |
1369 cmd = [self._python, self._process_coverage_tool, | 1380 cmd = [self._python, self._process_coverage_tool, |
1370 '--target', self._target, | 1381 '--target', self._target, |
1371 '--build-dir', self._build_dir] | 1382 '--build-dir', self._build_dir] |
1372 | 1383 |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1677 return '%s/%s/%s' % (config.Master.archive_url, archive_type, builder_name) | 1688 return '%s/%s/%s' % (config.Master.archive_url, archive_type, builder_name) |
1678 | 1689 |
1679 | 1690 |
1680 def _GetSnapshotUrl(factory_properties=None, builder_name='%(build_name)s'): | 1691 def _GetSnapshotUrl(factory_properties=None, builder_name='%(build_name)s'): |
1681 if not factory_properties or 'gs_bucket' not in factory_properties: | 1692 if not factory_properties or 'gs_bucket' not in factory_properties: |
1682 return (_GetArchiveUrl('snapshots', builder_name), None) | 1693 return (_GetArchiveUrl('snapshots', builder_name), None) |
1683 gs_bucket = factory_properties['gs_bucket'] | 1694 gs_bucket = factory_properties['gs_bucket'] |
1684 gs_bucket = re.sub(r'^gs://', 'http://commondatastorage.googleapis.com/', | 1695 gs_bucket = re.sub(r'^gs://', 'http://commondatastorage.googleapis.com/', |
1685 gs_bucket) | 1696 gs_bucket) |
1686 return ('%s/index.html?path=%s' % (gs_bucket, builder_name), '/') | 1697 return ('%s/index.html?path=%s' % (gs_bucket, builder_name), '/') |
OLD | NEW |