Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(951)

Side by Side Diff: scripts/slave/recipe_modules/archive/api.py

Issue 2394163006: Reland: Make clusterfuzz_archive include llvm-symbolizer and sancov. (Closed)
Patch Set: fix Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/archive/example.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 import re 5 import re
6 import sys 6 import sys
7 7
8 import manual_bisect_files 8 import manual_bisect_files
9 from recipe_engine import recipe_api 9 from recipe_engine import recipe_api
10 10
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 cp_branch, cp_number = self.m.commit_position.parse(commit_position) 263 cp_branch, cp_number = self.m.commit_position.parse(commit_position)
264 build_git_commit = self._get_git_commit(update_properties, primary_project) 264 build_git_commit = self._get_git_commit(update_properties, primary_project)
265 265
266 if fixed_staging_dir: 266 if fixed_staging_dir:
267 staging_dir = self.m.path['slave_build'].join('chrome_staging') 267 staging_dir = self.m.path['slave_build'].join('chrome_staging')
268 self.m.file.rmtree('purge staging dir', staging_dir) 268 self.m.file.rmtree('purge staging dir', staging_dir)
269 self.m.file.makedirs('create staging dir', staging_dir) 269 self.m.file.makedirs('create staging dir', staging_dir)
270 else: 270 else:
271 staging_dir = self.m.path.mkdtemp('chrome_staging') 271 staging_dir = self.m.path.mkdtemp('chrome_staging')
272 272
273 llvm_tools_to_copy = ['llvm-symbolizer', 'sancov']
274 llvm_bin_dir = self.m.path['checkout'].join('third_party', 'llvm-build',
275 'Release+Asserts', 'bin')
276 ext = '.exe' if self.m.platform.is_win else ''
277
278 for tool in llvm_tools_to_copy:
279 tool_src = self.m.path.join(llvm_bin_dir, tool + ext)
280 tool_dst = self.m.path.join(build_dir, tool + ext)
281
282 if not self.m.path.exists(tool_src):
283 continue
284
285 try:
286 self.m.file.copy('Copy ' + tool, tool_src, tool_dst)
287 except self.m.step.StepFailure: # pragma: no cover
288 # On some builds, it appears that a soft/hard link of llvm-symbolizer
289 # exists in the build directory, which causes shutil.copy to raise an
290 # exception. Either way, this shouldn't cause the whole build to fail.
Nico 2016/10/07 20:04:31 Doesn't this still have the "only works on clobber
Oliver Chang 2016/10/07 20:34:58 file.copy should always replace the destination. T
291 pass
292
273 # Build the list of files to archive. 293 # Build the list of files to archive.
274 zip_file_list = [f for f in self.m.file.listdir('build_dir', build_dir) 294 zip_file_list = [f for f in self.m.file.listdir('build_dir', build_dir)
275 if self._cf_should_package_file(f)] 295 if self._cf_should_package_file(f)]
276 296
277 # Use the legacy platform name as Clusterfuzz has some expectations on 297 # Use the legacy platform name as Clusterfuzz has some expectations on
278 # this (it only affects Windows, where it replace 'win' by 'win32'). 298 # this (it only affects Windows, where it replace 'win' by 'win32').
279 pieces = [self.legacy_platform_name(), target.lower()] 299 pieces = [self.legacy_platform_name(), target.lower()]
280 if archive_subdir_suffix: 300 if archive_subdir_suffix:
281 pieces.append(archive_subdir_suffix) 301 pieces.append(archive_subdir_suffix)
282 subdir = '-'.join(pieces) 302 subdir = '-'.join(pieces)
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 def legacy_download_url(self, gs_bucket_name, extra_url_components=None): 456 def legacy_download_url(self, gs_bucket_name, extra_url_components=None):
437 """Returns a url suitable for downloading a Chromium build from 457 """Returns a url suitable for downloading a Chromium build from
438 Google Storage. 458 Google Storage.
439 459
440 extra_url_components, if specified, should be a string without a 460 extra_url_components, if specified, should be a string without a
441 trailing '/' which is inserted in the middle of the URL. 461 trailing '/' which is inserted in the middle of the URL.
442 462
443 The builder_name, or parent_buildername, is always automatically 463 The builder_name, or parent_buildername, is always automatically
444 inserted into the URL.""" 464 inserted into the URL."""
445 return self._legacy_url(True, gs_bucket_name, extra_url_components) 465 return self._legacy_url(True, gs_bucket_name, extra_url_components)
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/archive/example.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698