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', 'checklicense s.py') | |
nsylvain
2011/09/15 16:54:49
80 chars
Paweł Hajdan Jr.
2011/09/15 17:21:06
Done.
| |
78 self._posix_memory_tests_runner = J('src', 'tools', 'valgrind', | 79 self._posix_memory_tests_runner = J('src', 'tools', 'valgrind', |
79 'chrome_tests.sh') | 80 'chrome_tests.sh') |
80 self._win_memory_tests_runner = J('src', 'tools', 'valgrind', | 81 self._win_memory_tests_runner = J('src', 'tools', 'valgrind', |
81 'chrome_tests.bat') | 82 'chrome_tests.bat') |
82 self._heapcheck_tool = J('src', 'tools', 'heapcheck', 'chrome_tests.sh') | 83 self._heapcheck_tool = J('src', 'tools', 'heapcheck', 'chrome_tests.sh') |
83 self._annotated_steps = J('src', 'build', 'buildbot_annotated_steps.py') | 84 self._annotated_steps = J('src', 'build', 'buildbot_annotated_steps.py') |
84 self._nacl_integration_tester_tool = J( | 85 self._nacl_integration_tester_tool = J( |
85 'src', 'chrome', 'test', 'nacl_test_injection', | 86 'src', 'chrome', 'test', 'nacl_test_injection', |
86 'buildbot_nacl_integration.py') | 87 'buildbot_nacl_integration.py') |
87 # chrome_staging directory, relative to the build directory. | 88 # 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] | 186 cmd = [self._python, self._check_bins_tool, build_dir] |
186 self.AddTestStep(shell.ShellCommand, 'check_bins', cmd, | 187 self.AddTestStep(shell.ShellCommand, 'check_bins', cmd, |
187 do_step_if=self.TestStepFilter) | 188 do_step_if=self.TestStepFilter) |
188 | 189 |
189 def AddCheckPermsStep(self): | 190 def AddCheckPermsStep(self): |
190 cmd = [self._python, self._check_perms_tool, | 191 cmd = [self._python, self._check_perms_tool, |
191 '--root', self._repository_root] | 192 '--root', self._repository_root] |
192 self.AddTestStep(shell.ShellCommand, 'check_perms', cmd, | 193 self.AddTestStep(shell.ShellCommand, 'check_perms', cmd, |
193 do_step_if=self.TestStepFilter) | 194 do_step_if=self.TestStepFilter) |
194 | 195 |
196 def AddCheckLicensesStep(self): | |
197 cmd = [self._python, self._check_licenses_tool, | |
198 '--root', self._repository_root] | |
199 self.AddTestStep(shell.ShellCommand, 'check_licenses', cmd, | |
200 do_step_if=self.TestStepFilter) | |
201 | |
195 def AddCheckLKGRStep(self): | 202 def AddCheckLKGRStep(self): |
196 """Check LKGR; if unchanged, cancel the build. | 203 """Check LKGR; if unchanged, cancel the build. |
197 | 204 |
198 Unlike other "test step" commands, this one can cancel the build | 205 Unlike other "test step" commands, this one can cancel the build |
199 while still keeping it green. | 206 while still keeping it green. |
200 | 207 |
201 Note we use "." as a root (which is the same as self.working_dir) | 208 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. | 209 to make sure a clobber step deletes the saved lkgr file. |
203 """ | 210 """ |
204 cmd = [self._python, self._check_lkgr_tool, '--root', '.'] | 211 cmd = [self._python, self._check_lkgr_tool, '--root', '.'] |
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1147 # ArchiveCommand.createSummary. | 1154 # ArchiveCommand.createSummary. |
1148 return '%s/%s/%s' % (config.Master.archive_url, archive_type, builder_name) | 1155 return '%s/%s/%s' % (config.Master.archive_url, archive_type, builder_name) |
1149 | 1156 |
1150 def _GetSnapshotUrl(factory_properties=None, builder_name='%(build_name)s'): | 1157 def _GetSnapshotUrl(factory_properties=None, builder_name='%(build_name)s'): |
1151 if not factory_properties or 'gs_bucket' not in factory_properties: | 1158 if not factory_properties or 'gs_bucket' not in factory_properties: |
1152 return (_GetArchiveUrl('snapshots', builder_name), None) | 1159 return (_GetArchiveUrl('snapshots', builder_name), None) |
1153 gs_bucket = factory_properties['gs_bucket'] | 1160 gs_bucket = factory_properties['gs_bucket'] |
1154 gs_bucket = re.sub(r'^gs://', 'http://commondatastorage.googleapis.com/', | 1161 gs_bucket = re.sub(r'^gs://', 'http://commondatastorage.googleapis.com/', |
1155 gs_bucket) | 1162 gs_bucket) |
1156 return ('%s/index.html?path=%s' % (gs_bucket, builder_name), '/') | 1163 return ('%s/index.html?path=%s' % (gs_bucket, builder_name), '/') |
OLD | NEW |