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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 while still keeping it green. | 221 while still keeping it green. |
222 | 222 |
223 Note we use "." as a root (which is the same as self.working_dir) | 223 Note we use "." as a root (which is the same as self.working_dir) |
224 to make sure a clobber step deletes the saved lkgr file. | 224 to make sure a clobber step deletes the saved lkgr file. |
225 """ | 225 """ |
226 cmd = [self._python, self._check_lkgr_tool, '--root', '.'] | 226 cmd = [self._python, self._check_lkgr_tool, '--root', '.'] |
227 self.AddTestStep(commands.CanCancelBuildShellCommand, | 227 self.AddTestStep(commands.CanCancelBuildShellCommand, |
228 'check lkgr and stop build if unchanged', | 228 'check lkgr and stop build if unchanged', |
229 cmd) | 229 cmd) |
230 | 230 |
| 231 def AddMachPortsTests(self, factory_properties=None): |
| 232 """Adds the Mac-specific Mach ports count test.""" |
| 233 factory_properties = factory_properties or {} |
| 234 c = self.GetPerfStepClass(factory_properties, 'mach_ports', |
| 235 process_log.GraphingLogProcessor) |
| 236 |
| 237 options = ['--gtest_filter=MachPortsTest.*'] |
| 238 cmd = self.GetTestCommand('performance_ui_tests', options, |
| 239 factory_properties=factory_properties) |
| 240 |
| 241 cmd = self.AddBuildProperties(cmd) |
| 242 cmd = self.AddFactoryProperties(factory_properties, cmd) |
| 243 |
| 244 self.AddTestStep(c, 'mach_ports', cmd, do_step_if=self.TestStepFilter) |
| 245 |
231 def GetPageCyclerCommand(self, test_name, http, factory_properties=None): | 246 def GetPageCyclerCommand(self, test_name, http, factory_properties=None): |
232 """Returns a command list to call the _test_tool on the page_cycler | 247 """Returns a command list to call the _test_tool on the page_cycler |
233 executable, with the appropriate GTest filter and additional arguments. | 248 executable, with the appropriate GTest filter and additional arguments. |
234 """ | 249 """ |
235 cmd = [self._python, self._test_tool, | 250 cmd = [self._python, self._test_tool, |
236 '--target', self._target, | 251 '--target', self._target, |
237 '--build-dir', self._build_dir] | 252 '--build-dir', self._build_dir] |
238 if http: | 253 if http: |
239 test_type = 'Http' | 254 test_type = 'Http' |
240 cmd.extend(['--with-httpd', self.PathJoin('src', 'data', 'page_cycler')]) | 255 cmd.extend(['--with-httpd', self.PathJoin('src', 'data', 'page_cycler')]) |
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1008 # ArchiveCommand.createSummary. | 1023 # ArchiveCommand.createSummary. |
1009 return '%s/%s/%s' % (config.Master.archive_url, archive_type, builder_name) | 1024 return '%s/%s/%s' % (config.Master.archive_url, archive_type, builder_name) |
1010 | 1025 |
1011 def _GetSnapshotUrl(factory_properties=None, builder_name='%(build_name)s'): | 1026 def _GetSnapshotUrl(factory_properties=None, builder_name='%(build_name)s'): |
1012 if not factory_properties or 'gs_bucket' not in factory_properties: | 1027 if not factory_properties or 'gs_bucket' not in factory_properties: |
1013 return (_GetArchiveUrl('snapshots', builder_name), None) | 1028 return (_GetArchiveUrl('snapshots', builder_name), None) |
1014 gs_bucket = factory_properties['gs_bucket'] | 1029 gs_bucket = factory_properties['gs_bucket'] |
1015 gs_bucket = re.sub(r'^gs://', 'http://commondatastorage.googleapis.com/', | 1030 gs_bucket = re.sub(r'^gs://', 'http://commondatastorage.googleapis.com/', |
1016 gs_bucket) | 1031 gs_bucket) |
1017 return ('%s/index.html?path=%s' % (gs_bucket, builder_name), '/') | 1032 return ('%s/index.html?path=%s' % (gs_bucket, builder_name), '/') |
OLD | NEW |