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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 self._lint_test_files_tool = J(s_dir, 'lint_test_files_wrapper.py') | 64 self._lint_test_files_tool = J(s_dir, 'lint_test_files_wrapper.py') |
65 self._devtools_perf_test_tool = J(s_dir, 'devtools_perf_test_wrapper.py') | 65 self._devtools_perf_test_tool = J(s_dir, 'devtools_perf_test_wrapper.py') |
66 self._archive_coverage = J(s_dir, 'archive_coverage.py') | 66 self._archive_coverage = J(s_dir, 'archive_coverage.py') |
67 self._gpu_archive_tool = J(s_dir, 'archive_gpu_pixel_test_results.py') | 67 self._gpu_archive_tool = J(s_dir, 'archive_gpu_pixel_test_results.py') |
68 self._crash_dump_tool = J(s_dir, 'archive_crash_dumps.py') | 68 self._crash_dump_tool = J(s_dir, 'archive_crash_dumps.py') |
69 self._dom_perf_tool = J(s_dir, 'dom_perf.py') | 69 self._dom_perf_tool = J(s_dir, 'dom_perf.py') |
70 self._asan_archive_tool = J(s_dir, 'asan_archive_build.py') | 70 self._asan_archive_tool = J(s_dir, 'asan_archive_build.py') |
71 self._archive_tool = J(s_dir, 'archive_build.py') | 71 self._archive_tool = J(s_dir, 'archive_build.py') |
72 self._sizes_tool = J(s_dir, 'sizes.py') | 72 self._sizes_tool = J(s_dir, 'sizes.py') |
73 self._check_lkgr_tool = J(s_dir, 'check_lkgr.py') | 73 self._check_lkgr_tool = J(s_dir, 'check_lkgr.py') |
| 74 self._windows_asan_tool = J(s_dir, 'win_apply_asan.py') |
74 | 75 |
75 # Scripts in the private dir. | 76 # Scripts in the private dir. |
76 self._download_and_extract_official_tool = self.PathJoin( | 77 self._download_and_extract_official_tool = self.PathJoin( |
77 p_dir, 'get_official_build.py') | 78 p_dir, 'get_official_build.py') |
78 | 79 |
79 # Reliability paths. | 80 # Reliability paths. |
80 self._reliability_tool = J(self._script_dir, 'reliability_tests.py') | 81 self._reliability_tool = J(self._script_dir, 'reliability_tests.py') |
81 self._reliability_data = J('src', 'chrome', 'test', 'data', 'reliability') | 82 self._reliability_data = J('src', 'chrome', 'test', 'data', 'reliability') |
82 | 83 |
83 # These scripts should be move to the script dir. | 84 # These scripts should be move to the script dir. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 if not perf_id: | 129 if not perf_id: |
129 logging.error('Error: cannot upload perf expectations: perf_id is unset') | 130 logging.error('Error: cannot upload perf expectations: perf_id is unset') |
130 return | 131 return |
131 slavesrc = 'src/tools/perf_expectations/perf_expectations.json' | 132 slavesrc = 'src/tools/perf_expectations/perf_expectations.json' |
132 masterdest = ('../../scripts/master/log_parser/perf_expectations/%s.json' % | 133 masterdest = ('../../scripts/master/log_parser/perf_expectations/%s.json' % |
133 perf_id) | 134 perf_id) |
134 | 135 |
135 self._factory.addStep(FileUpload(slavesrc=slavesrc, | 136 self._factory.addStep(FileUpload(slavesrc=slavesrc, |
136 masterdest=masterdest)) | 137 masterdest=masterdest)) |
137 | 138 |
| 139 def AddWindowsASANStep(self): |
| 140 """Adds a step to run syzygy/ASAN over the output directory.""" |
| 141 cmd = [self._python, self._windows_asan_tool, |
| 142 '--build-dir', self._build_dir, '--target', self._target] |
| 143 self.AddTestStep(shell.ShellCommand, 'apply_asan', cmd) |
| 144 |
138 def AddArchiveBuild(self, mode='dev', show_url=True, factory_properties=None): | 145 def AddArchiveBuild(self, mode='dev', show_url=True, factory_properties=None): |
139 """Adds a step to the factory to archive a build.""" | 146 """Adds a step to the factory to archive a build.""" |
140 | 147 |
141 extra_archive_paths = factory_properties.get('extra_archive_paths') | 148 extra_archive_paths = factory_properties.get('extra_archive_paths') |
142 use_build_number = factory_properties.get('use_build_number', False) | 149 use_build_number = factory_properties.get('use_build_number', False) |
143 | 150 |
144 if show_url: | 151 if show_url: |
145 (url, index_suffix) = _GetSnapshotUrl(factory_properties) | 152 (url, index_suffix) = _GetSnapshotUrl(factory_properties) |
146 text = 'download' | 153 text = 'download' |
147 else: | 154 else: |
(...skipping 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1717 return '%s/%s/%s' % (config.Master.archive_url, archive_type, builder_name) | 1724 return '%s/%s/%s' % (config.Master.archive_url, archive_type, builder_name) |
1718 | 1725 |
1719 | 1726 |
1720 def _GetSnapshotUrl(factory_properties=None, builder_name='%(build_name)s'): | 1727 def _GetSnapshotUrl(factory_properties=None, builder_name='%(build_name)s'): |
1721 if not factory_properties or 'gs_bucket' not in factory_properties: | 1728 if not factory_properties or 'gs_bucket' not in factory_properties: |
1722 return (_GetArchiveUrl('snapshots', builder_name), None) | 1729 return (_GetArchiveUrl('snapshots', builder_name), None) |
1723 gs_bucket = factory_properties['gs_bucket'] | 1730 gs_bucket = factory_properties['gs_bucket'] |
1724 gs_bucket = re.sub(r'^gs://', 'http://commondatastorage.googleapis.com/', | 1731 gs_bucket = re.sub(r'^gs://', 'http://commondatastorage.googleapis.com/', |
1725 gs_bucket) | 1732 gs_bucket) |
1726 return ('%s/index.html?path=%s' % (gs_bucket, builder_name), '/') | 1733 return ('%s/index.html?path=%s' % (gs_bucket, builder_name), '/') |
OLD | NEW |