| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Set of utilities to add commands to a buildbot factory. | 6 """Set of utilities to add commands to a buildbot factory. |
| 7 | 7 |
| 8 This is based on commands.py and adds chromium-specific commands.""" | 8 This is based on commands.py and adds chromium-specific commands.""" |
| 9 | 9 |
| 10 import os | 10 import os |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 | 398 |
| 399 def AddCheckDepsStep(self): | 399 def AddCheckDepsStep(self): |
| 400 cmd = [self._python, self._check_deps_tool, | 400 cmd = [self._python, self._check_deps_tool, |
| 401 '--root', self._repository_root] | 401 '--root', self._repository_root] |
| 402 self.AddTestStep(shell.ShellCommand, 'check deps', cmd) | 402 self.AddTestStep(shell.ShellCommand, 'check deps', cmd) |
| 403 | 403 |
| 404 def GetPageCyclerTestClass(self, perf_id, test_name, show_results, http): | 404 def GetPageCyclerTestClass(self, perf_id, test_name, show_results, http): |
| 405 """Selects the right build step for the specified page-cycler test.""" | 405 """Selects the right build step for the specified page-cycler test.""" |
| 406 report_link = None | 406 report_link = None |
| 407 output_dir = None | 407 output_dir = None |
| 408 perf_name = None |
| 408 if show_results and self._target in self.PAGECYCLER_TEST_MAPPINGS: | 409 if show_results and self._target in self.PAGECYCLER_TEST_MAPPINGS: |
| 409 mapping = self.PAGECYCLER_TEST_MAPPINGS[self._target] | 410 mapping = self.PAGECYCLER_TEST_MAPPINGS[self._target] |
| 410 dir_name = mapping.get(perf_id) | 411 dir_name = mapping.get(perf_id) |
| 411 if dir_name: | 412 if dir_name: |
| 412 if http: | 413 if http: |
| 413 test_name += '-http' | 414 test_name += '-http' |
| 415 perf_name = '%s/%s' % (dir_name, test_name) |
| 414 report_link = (self.PERF_BASE_URL + | 416 report_link = (self.PERF_BASE_URL + |
| 415 '/%s/%s/' % (dir_name, test_name) + | 417 '/%s/%s/' % (dir_name, test_name) + |
| 416 self.PERF_REPORT_URL_SUFFIX) | 418 self.PERF_REPORT_URL_SUFFIX) |
| 417 output_dir = '%s/%s/%s' % (self.PERF_OUTPUT_DIR, dir_name, test_name) | 419 output_dir = '%s/%s/%s' % (self.PERF_OUTPUT_DIR, dir_name, test_name) |
| 418 else: | 420 else: |
| 419 raise Exception, ('There is no mapping for identifier %s in %s' % | 421 raise Exception, ('There is no mapping for identifier %s in %s' % |
| 420 (perf_id, self._target)) | 422 (perf_id, self._target)) |
| 421 | 423 |
| 422 return self._CreatePerformanceStepClass( | 424 return self._CreatePerformanceStepClass( |
| 423 process_log.GraphingPageCyclerLogProcessor, | 425 process_log.GraphingPageCyclerLogProcessor, |
| 424 report_link=report_link, | 426 report_link=report_link, |
| 425 output_dir=output_dir) | 427 output_dir=output_dir, |
| 428 perf_name=perf_name) |
| 426 | 429 |
| 427 def GetPageCyclerCommand(self, test_name, http): | 430 def GetPageCyclerCommand(self, test_name, http): |
| 428 """Returns a command list to call the _test_tool on the page_cycler | 431 """Returns a command list to call the _test_tool on the page_cycler |
| 429 executable, with the appropriate GTest filter and additional arguments. | 432 executable, with the appropriate GTest filter and additional arguments. |
| 430 """ | 433 """ |
| 431 cmd = [self._python, self._test_tool, | 434 cmd = [self._python, self._test_tool, |
| 432 '--target', self._target, | 435 '--target', self._target, |
| 433 '--build-dir', self._build_dir] | 436 '--build-dir', self._build_dir] |
| 434 if http: | 437 if http: |
| 435 test_type = 'Http' | 438 test_type = 'Http' |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 | 852 |
| 850 url = '%s/%s/%s' % (self._archive_url, 'coverage', perf_subdir) | 853 url = '%s/%s/%s' % (self._archive_url, 'coverage', perf_subdir) |
| 851 text = 'view coverage' | 854 text = 'view coverage' |
| 852 cmd_archive = [self._python, self._archive_coverage, | 855 cmd_archive = [self._python, self._archive_coverage, |
| 853 '--target', self._target, | 856 '--target', self._target, |
| 854 '--build-dir', self._build_dir, | 857 '--build-dir', self._build_dir, |
| 855 '--perf-subdir', perf_subdir] | 858 '--perf-subdir', perf_subdir] |
| 856 | 859 |
| 857 self.AddArchiveStep(data_description='coverage', base_url=url, | 860 self.AddArchiveStep(data_description='coverage', base_url=url, |
| 858 link_text=text, command=cmd_archive) | 861 link_text=text, command=cmd_archive) |
| OLD | NEW |