| OLD | NEW |
| 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 [script] + args) | 596 [script] + args) |
| 597 | 597 |
| 598 self.AddTestStep(retcode_command.ReturnCodeCommand, | 598 self.AddTestStep(retcode_command.ReturnCodeCommand, |
| 599 test_name, | 599 test_name, |
| 600 test_cmd, | 600 test_cmd, |
| 601 timeout=timeout, | 601 timeout=timeout, |
| 602 do_step_if=self.TestStepFilter) | 602 do_step_if=self.TestStepFilter) |
| 603 | 603 |
| 604 def AddChromeDriverTest(self, timeout=1200): | 604 def AddChromeDriverTest(self, timeout=1200): |
| 605 J = self.PathJoin | 605 J = self.PathJoin |
| 606 script = J('src', 'chrome', 'test', 'webdriver', | 606 script = J('src', 'chrome', 'test', 'webdriver', 'test', |
| 607 'chromedriver_tests.py') | 607 'run_chromedriver_tests.py') |
| 608 self._AddBasicPythonTest('chromedriver_tests', script, timeout=timeout) | 608 self._AddBasicPythonTest('chromedriver_tests', script, timeout=timeout) |
| 609 | 609 |
| 610 def AddWebDriverTest(self, timeout=1200): | 610 def AddWebDriverTest(self, timeout=1200): |
| 611 J = self.PathJoin | 611 J = self.PathJoin |
| 612 script = J('src', 'chrome', 'test', 'webdriver', | 612 script = J('src', 'chrome', 'test', 'webdriver', 'test', |
| 613 'run_webdriver_tests.py') | 613 'run_webdriver_tests.py') |
| 614 self._AddBasicPythonTest('webdriver_tests', script, timeout=timeout) | 614 self._AddBasicPythonTest('webdriver_tests', script, timeout=timeout) |
| 615 | 615 |
| 616 def AddPyAutoFunctionalTest(self, test_name, timeout=1200, | 616 def AddPyAutoFunctionalTest(self, test_name, timeout=1200, |
| 617 workdir=None, | 617 workdir=None, |
| 618 src_base=None, | 618 src_base=None, |
| 619 suite=None, | 619 suite=None, |
| 620 factory_properties=None): | 620 factory_properties=None): |
| 621 """Adds a step to run PyAuto functional tests. | 621 """Adds a step to run PyAuto functional tests. |
| 622 | 622 |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1121 # ArchiveCommand.createSummary. | 1121 # ArchiveCommand.createSummary. |
| 1122 return '%s/%s/%s' % (config.Master.archive_url, archive_type, builder_name) | 1122 return '%s/%s/%s' % (config.Master.archive_url, archive_type, builder_name) |
| 1123 | 1123 |
| 1124 def _GetSnapshotUrl(factory_properties=None, builder_name='%(build_name)s'): | 1124 def _GetSnapshotUrl(factory_properties=None, builder_name='%(build_name)s'): |
| 1125 if not factory_properties or 'gs_bucket' not in factory_properties: | 1125 if not factory_properties or 'gs_bucket' not in factory_properties: |
| 1126 return _GetArchiveUrl('snapshots', builder_name) | 1126 return _GetArchiveUrl('snapshots', builder_name) |
| 1127 gs_bucket = factory_properties['gs_bucket'] | 1127 gs_bucket = factory_properties['gs_bucket'] |
| 1128 gs_bucket = re.sub(r'^gs://', 'http://commondatastorage.googleapis.com/', | 1128 gs_bucket = re.sub(r'^gs://', 'http://commondatastorage.googleapis.com/', |
| 1129 gs_bucket) | 1129 gs_bucket) |
| 1130 return '%s/index.html?path=%s/' % (gs_bucket, builder_name) | 1130 return '%s/index.html?path=%s/' % (gs_bucket, builder_name) |
| OLD | NEW |