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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 # Scripts in the private dir. | 68 # Scripts in the private dir. |
69 self._reliability_tool = J(p_dir, 'reliability_tests.py') | 69 self._reliability_tool = J(p_dir, 'reliability_tests.py') |
70 self._reliability_data = J(p_dir, 'data', 'reliability') | 70 self._reliability_data = J(p_dir, 'data', 'reliability') |
71 self._download_and_extract_official_tool = self.PathJoin( | 71 self._download_and_extract_official_tool = self.PathJoin( |
72 p_dir, 'get_official_build.py') | 72 p_dir, 'get_official_build.py') |
73 | 73 |
74 # These scripts should be move to the script dir. | 74 # These scripts should be move to the script dir. |
75 self._check_deps_tool = J('src', 'tools', 'checkdeps', 'checkdeps.py') | 75 self._check_deps_tool = J('src', 'tools', 'checkdeps', 'checkdeps.py') |
76 self._check_bins_tool = J('src', 'tools', 'checkbins', 'checkbins.py') | 76 self._check_bins_tool = J('src', 'tools', 'checkbins', 'checkbins.py') |
77 self._check_perms_tool = J('src', 'tools', 'checkperms', 'checkperms.py') | 77 self._check_perms_tool = J('src', 'tools', 'checkperms', 'checkperms.py') |
| 78 self._check_licenses_tool = J('src', 'tools', 'checklicenses', |
| 79 'checklicenses.py') |
78 self._posix_memory_tests_runner = J('src', 'tools', 'valgrind', | 80 self._posix_memory_tests_runner = J('src', 'tools', 'valgrind', |
79 'chrome_tests.sh') | 81 'chrome_tests.sh') |
80 self._win_memory_tests_runner = J('src', 'tools', 'valgrind', | 82 self._win_memory_tests_runner = J('src', 'tools', 'valgrind', |
81 'chrome_tests.bat') | 83 'chrome_tests.bat') |
82 self._heapcheck_tool = J('src', 'tools', 'heapcheck', 'chrome_tests.sh') | 84 self._heapcheck_tool = J('src', 'tools', 'heapcheck', 'chrome_tests.sh') |
83 self._annotated_steps = J('src', 'build', 'buildbot_annotated_steps.py') | 85 self._annotated_steps = J('src', 'build', 'buildbot_annotated_steps.py') |
84 self._nacl_integration_tester_tool = J( | 86 self._nacl_integration_tester_tool = J( |
85 'src', 'chrome', 'test', 'nacl_test_injection', | 87 'src', 'chrome', 'test', 'nacl_test_injection', |
86 'buildbot_nacl_integration.py') | 88 'buildbot_nacl_integration.py') |
87 # chrome_staging directory, relative to the build directory. | 89 # chrome_staging directory, relative to the build directory. |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 cmd = [self._python, self._check_bins_tool, build_dir] | 187 cmd = [self._python, self._check_bins_tool, build_dir] |
186 self.AddTestStep(shell.ShellCommand, 'check_bins', cmd, | 188 self.AddTestStep(shell.ShellCommand, 'check_bins', cmd, |
187 do_step_if=self.TestStepFilter) | 189 do_step_if=self.TestStepFilter) |
188 | 190 |
189 def AddCheckPermsStep(self): | 191 def AddCheckPermsStep(self): |
190 cmd = [self._python, self._check_perms_tool, | 192 cmd = [self._python, self._check_perms_tool, |
191 '--root', self._repository_root] | 193 '--root', self._repository_root] |
192 self.AddTestStep(shell.ShellCommand, 'check_perms', cmd, | 194 self.AddTestStep(shell.ShellCommand, 'check_perms', cmd, |
193 do_step_if=self.TestStepFilter) | 195 do_step_if=self.TestStepFilter) |
194 | 196 |
| 197 def AddCheckLicensesStep(self): |
| 198 cmd = [self._python, self._check_licenses_tool, |
| 199 '--root', self._repository_root] |
| 200 self.AddTestStep(shell.ShellCommand, 'check_licenses', cmd, |
| 201 do_step_if=self.TestStepFilter) |
| 202 |
195 def AddCheckLKGRStep(self): | 203 def AddCheckLKGRStep(self): |
196 """Check LKGR; if unchanged, cancel the build. | 204 """Check LKGR; if unchanged, cancel the build. |
197 | 205 |
198 Unlike other "test step" commands, this one can cancel the build | 206 Unlike other "test step" commands, this one can cancel the build |
199 while still keeping it green. | 207 while still keeping it green. |
200 | 208 |
201 Note we use "." as a root (which is the same as self.working_dir) | 209 Note we use "." as a root (which is the same as self.working_dir) |
202 to make sure a clobber step deletes the saved lkgr file. | 210 to make sure a clobber step deletes the saved lkgr file. |
203 """ | 211 """ |
204 cmd = [self._python, self._check_lkgr_tool, '--root', '.'] | 212 cmd = [self._python, self._check_lkgr_tool, '--root', '.'] |
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1147 # ArchiveCommand.createSummary. | 1155 # ArchiveCommand.createSummary. |
1148 return '%s/%s/%s' % (config.Master.archive_url, archive_type, builder_name) | 1156 return '%s/%s/%s' % (config.Master.archive_url, archive_type, builder_name) |
1149 | 1157 |
1150 def _GetSnapshotUrl(factory_properties=None, builder_name='%(build_name)s'): | 1158 def _GetSnapshotUrl(factory_properties=None, builder_name='%(build_name)s'): |
1151 if not factory_properties or 'gs_bucket' not in factory_properties: | 1159 if not factory_properties or 'gs_bucket' not in factory_properties: |
1152 return (_GetArchiveUrl('snapshots', builder_name), None) | 1160 return (_GetArchiveUrl('snapshots', builder_name), None) |
1153 gs_bucket = factory_properties['gs_bucket'] | 1161 gs_bucket = factory_properties['gs_bucket'] |
1154 gs_bucket = re.sub(r'^gs://', 'http://commondatastorage.googleapis.com/', | 1162 gs_bucket = re.sub(r'^gs://', 'http://commondatastorage.googleapis.com/', |
1155 gs_bucket) | 1163 gs_bucket) |
1156 return ('%s/index.html?path=%s' % (gs_bucket, builder_name), '/') | 1164 return ('%s/index.html?path=%s' % (gs_bucket, builder_name), '/') |
OLD | NEW |