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

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

Issue 2128613005: Archive Linux perf builds for manual bisect (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Archive Linux perf builds for manual bisect [2] Created 4 years, 5 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
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 6
7 from recipe_engine import recipe_api 7 from recipe_engine import recipe_api
8 from . import perf_test_files
8 9
9 10
10 # TODO(machenbach): Chromium specific data should move out of the archive 11 # TODO(machenbach): Chromium specific data should move out of the archive
11 # module, into e.g. the chromium test configs. 12 # module, into e.g. the chromium test configs.
12 EXCLUDED_FILES_ALL_PLATFORMS = [ 13 EXCLUDED_FILES_ALL_PLATFORMS = [
13 '.landmines', 14 '.landmines',
14 '.ninja_deps', 15 '.ninja_deps',
15 '.ninja_log', 16 '.ninja_log',
16 'gen', 17 'gen',
17 'obj', 18 'obj',
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 artifacts implemented as a wrapper around zip_build.py script. 86 artifacts implemented as a wrapper around zip_build.py script.
86 87
87 If you need to upload or download build artifacts (or any other files) for 88 If you need to upload or download build artifacts (or any other files) for
88 something other than Chromium flavor, consider using 'zip' + 'gsutil' or 89 something other than Chromium flavor, consider using 'zip' + 'gsutil' or
89 'isolate' modules instead. 90 'isolate' modules instead.
90 """ 91 """
91 92
92 def zip_and_upload_build( 93 def zip_and_upload_build(
93 self, step_name, target, build_url=None, src_dir=None, 94 self, step_name, target, build_url=None, src_dir=None,
94 build_revision=None, cros_board=None, package_dsym_files=False, 95 build_revision=None, cros_board=None, package_dsym_files=False,
95 exclude_files=None, **kwargs): 96 exclude_files=None, includePerfTestFiles=True, update_properties = None, s tore_by_hash = True, **kwargs):
dimu1 2016/07/07 21:54:11 make use of **kwargs, no need to explicitly declar
96 """Returns a step invoking zip_build.py to zip up a Chromium build. 97 """Returns a step invoking zip_build.py to zip up a Chromium build.
97 If build_url is specified, also uploads the build.""" 98 If build_url is specified, also uploads the build."""
98 args = [ 99 args = [
99 '--show-path', 100 '--show-path',
100 'python', 101 'python',
101 self.package_repo_resource('scripts', 'slave', 'zip_build.py'), 102 self.package_repo_resource('scripts', 'slave', 'zip_build.py'),
102 '--target', target, 103 '--target', target,
103 ] 104 ]
105
104 if build_url or 'build_archive_url' in self.m.properties: 106 if build_url or 'build_archive_url' in self.m.properties:
105 args.extend(['--build-url', 107 args.extend(['--build-url',
106 build_url or self.m.properties['build_archive_url']]) 108 build_url or self.m.properties['build_archive_url']])
107 if build_revision: 109 if build_revision:
108 args.extend(['--build_revision', build_revision]) 110 args.extend(['--build_revision', build_revision])
109 elif src_dir: 111 elif src_dir:
110 args.extend(['--src-dir', src_dir]) 112 args.extend(['--src-dir', src_dir])
111 if cros_board: 113 if cros_board:
112 args.extend(['--cros-board', cros_board]) 114 args.extend(['--cros-board', cros_board])
113 if package_dsym_files: 115 if package_dsym_files:
114 args.append('--package-dsym-files') 116 args.append('--package-dsym-files')
115 if exclude_files: 117 if exclude_files:
116 args.extend(['--exclude-files', exclude_files]) 118 args.extend(['--exclude-files', exclude_files])
119 if not includePerfTestFiles:
120 args.extend(['--strip_symbol'])
117 if 'gs_acl' in self.m.properties: 121 if 'gs_acl' in self.m.properties:
118 args.extend(['--gs-acl', self.m.properties['gs_acl']]) 122 args.extend(['--gs-acl', self.m.properties['gs_acl']])
123 if not includePerfTestFiles:
dimu1 2016/07/07 21:54:11 merge this block with the previous if block in lin
124 inclusions = ",".join(perf_test_files.FILES)
125 args.extend(['--include-files', inclusions])
126 args.extend(['--exclusive_include'])
127 # If update_properties is passed in and store_by_hash is False, we store i t with commit position number instead of a hash
dimu1 2016/07/07 21:54:11 nit: 80 words
128 if update_properties and not store_by_hash:
129 commit_position = self._get_commit_position(
130 update_properties, None)
131 cp_branch, cp_number = self.m.commit_position.parse(commit_position)
132 args.extend(['--build_revision', cp_number])
119 133
120 properties_json = self.m.json.dumps(self.m.properties.legacy()) 134 properties_json = self.m.json.dumps(self.m.properties.legacy())
121 args.extend(['--factory-properties', properties_json, 135 args.extend(['--factory-properties', properties_json,
122 '--build-properties', properties_json]) 136 '--build-properties', properties_json])
123 137
124 kwargs['allow_subannotations'] = True 138 kwargs['allow_subannotations'] = True
125 self.m.python( 139 self.m.python(
126 step_name, 140 step_name,
127 self.package_repo_resource('scripts', 'tools', 'runit.py'), 141 self.package_repo_resource('scripts', 'tools', 'runit.py'),
128 args, 142 args,
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 def legacy_download_url(self, gs_bucket_name, extra_url_components=None): 417 def legacy_download_url(self, gs_bucket_name, extra_url_components=None):
404 """Returns a url suitable for downloading a Chromium build from 418 """Returns a url suitable for downloading a Chromium build from
405 Google Storage. 419 Google Storage.
406 420
407 extra_url_components, if specified, should be a string without a 421 extra_url_components, if specified, should be a string without a
408 trailing '/' which is inserted in the middle of the URL. 422 trailing '/' which is inserted in the middle of the URL.
409 423
410 The builder_name, or parent_buildername, is always automatically 424 The builder_name, or parent_buildername, is always automatically
411 inserted into the URL.""" 425 inserted into the URL."""
412 return self._legacy_url(True, gs_bucket_name, extra_url_components) 426 return self._legacy_url(True, gs_bucket_name, extra_url_components)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698