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

Unified Diff: scripts/slave/zip_build.py

Issue 2128613005: Archive Linux perf builds for manual bisect (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: removed unzip_strip_zip, code style change 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 side-by-side diff with in-line comments
Download patch
Index: scripts/slave/zip_build.py
diff --git a/scripts/slave/zip_build.py b/scripts/slave/zip_build.py
index c02908bd4aac99a1520b69ae3689872ab78127eb..ab7b098120d41f4c548c5dda0c78d547678352f5 100755
--- a/scripts/slave/zip_build.py
+++ b/scripts/slave/zip_build.py
@@ -166,16 +166,20 @@ def WriteRevisionFile(dirname, build_revision):
except IOError:
print 'Writing to revision file in %s failed.' % dirname
-
def MakeUnversionedArchive(build_dir, staging_dir, zip_file_list,
- zip_file_name):
+ zip_file_name, strip_symbol=False):
"""Creates an unversioned full build archive.
Returns the path of the created archive."""
+ strip_files = None
+ if strip_symbol:
+ strip_files = ['chrome', 'nacl_helper']
stgao 2016/07/11 19:04:27 Not sure where this file list should be, but this
miimnk 2016/07/11 22:08:48 There are only two binary files with a significant
stgao 2016/07/12 20:40:40 Stripping big files are good for now. My comment
miimnk 2016/07/13 01:12:48 I stored the strip list in archive/perf_test_files
(zip_dir, zip_file) = chromium_utils.MakeZip(staging_dir,
zip_file_name,
zip_file_list,
build_dir,
- raise_error=True)
+ raise_error=True,
+ strip_files=strip_files)
+
chromium_utils.RemoveDirectory(zip_dir)
if not os.path.exists(zip_file):
raise StagingError('Failed to make zip package %s' % zip_file)
@@ -260,6 +264,7 @@ class PathMatcher(object):
self.regex_whitelist = FileRegexWhitelist(options)
self.regex_blacklist = FileRegexBlacklist(options)
self.exclude_unmatched = options.exclude_unmatched
+ self.exclusive_include = options.exclusive_include
stgao 2016/07/11 19:04:27 What's this for? The naming seems a bit confusing
miimnk 2016/07/11 22:08:48 Currently, it is not possible to only include item
def __str__(self):
return '\n '.join([
@@ -273,6 +278,9 @@ class PathMatcher(object):
def Match(self, filename):
if filename in self.inclusions:
return True
+ # Added to implement exclusive include
+ if self.exclusive_include:
+ return False
if filename in self.exclusions:
return False
if re.match(self.regex_whitelist, filename):
@@ -286,7 +294,6 @@ def Archive(options):
build_dir = build_directory.GetBuildOutputDirectory(
options.src_dir, options.cros_board)
build_dir = os.path.abspath(os.path.join(build_dir, options.target))
-
staging_dir = slave_utils.GetStagingDir(options.src_dir)
chromium_utils.MakeParentDirectoriesWorldReadable(staging_dir)
@@ -352,7 +359,7 @@ def Archive(options):
zip_file_list.extend(mojom_files)
zip_file = MakeUnversionedArchive(build_dir, staging_dir, zip_file_list,
- unversioned_base_name)
+ unversioned_base_name, strip_symbol=options.strip_symbol)
zip_base, zip_ext, versioned_file = MakeVersionedArchive(
zip_file, version_suffix, options)
@@ -399,6 +406,8 @@ def main(argv):
option_parser.add_option('--include-files', default='',
help='Comma separated list of files that should '
'always be included in the zip.')
+ option_parser.add_option('--exclusive_include', action='store_true',
+ default=False, help='Only include the files in include-files list')
option_parser.add_option('--master-name', help='Name of the buildbot master.')
option_parser.add_option('--slave-name', help='Name of the buildbot slave.')
option_parser.add_option('--build-number', type=int,
@@ -430,6 +439,8 @@ def main(argv):
default=False, help='Add also dSYM files.')
option_parser.add_option('--append-deps-patch-sha', action='store_true')
option_parser.add_option('--gs-acl')
+ option_parser.add_option('--strip_symbol', action='store_true',
+ default=False, help='Strip symbols from chrome executable.')
option_parser.add_option('--json-urls',
help=('Path to json file containing uploaded '
'archive urls. If this is omitted then '

Powered by Google App Engine
This is Rietveld 408576698