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

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: 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..7980c9d0fa9f8193b6495f1e3fcb6675ad6db0f9 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']
(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.ignore_regex = options.ignore_regex
def __str__(self):
return '\n '.join([
@@ -268,13 +273,17 @@ class PathMatcher(object):
'Exclusions: %s' % self.exclusions,
"Whitelist regex: '%s'" % self.regex_whitelist,
"Blacklist regex: '%s'" % self.regex_blacklist,
- 'Zip unmatched files: %s' % (not self.exclude_unmatched)])
+ 'Zip unmatched files: %s' % (not self.exclude_unmatched),
+ 'Ignore regex matches: %s' % (self.ignore_regex)])
+
def Match(self, filename):
if filename in self.inclusions:
return True
if filename in self.exclusions:
return False
+ if self.ignore_regex:
+ return False
if re.match(self.regex_whitelist, filename):
return True
if re.match(self.regex_blacklist, filename):
@@ -286,7 +295,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 +360,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 +407,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('--ignore_regex', action='store_true',
+ default=False, help='Ignores regex matches')
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 +440,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