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

Unified Diff: scripts/slave/zip_build.py

Issue 11379003: Add Windows ASAN bots. (Closed) Base URL: http://git.chromium.org/chromium/tools/build.git@neuter
Patch Set: Rebase, tweaks, lint Created 8 years, 1 month 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 e379cc72631d86e6723bd3b6ab0a96ae30a0f269..c61f6b304f076966dea6c29a4275f2049cd86d32 100755
--- a/scripts/slave/zip_build.py
+++ b/scripts/slave/zip_build.py
@@ -194,14 +194,30 @@ def WriteRevisionFile(dirname, build_revision):
def MakeUnversionedArchive(build_dir, staging_dir, zip_file_list,
- zip_file_name):
+ zip_file_name, filters):
"""Creates an unversioned full build archive.
Returns the path of the created archive."""
+ replacements = []
+ if 'asan' in filters:
+ def ASANFilter(path):
+ parts = path.split('.', 1)
+ if len(parts) == 1:
+ return path
+ if parts[-1].startswith('asan'): # skip 'foo.asan.exe' entirely
+ return None
+ parts.insert(1, 'asan')
+ asan_path = '.'.join(parts)
+ if os.path.exists(asan_path):
+ return asan_path
+ return path
+ replacements.append(ASANFilter)
+
(zip_dir, zip_file) = chromium_utils.MakeZip(staging_dir,
zip_file_name,
zip_file_list,
build_dir,
- raise_error=True)
+ raise_error=True,
+ replacements=replacements)
chromium_utils.RemoveDirectory(zip_dir)
if not os.path.exists(zip_file):
raise StagingError('Failed to make zip package %s' % zip_file)
@@ -319,7 +335,7 @@ def Archive(options):
zip_file_list = [f for f in root_files if path_filter.Match(f)]
zip_file = MakeUnversionedArchive(build_dir, staging_dir, zip_file_list,
- unversioned_base_name)
+ unversioned_base_name, options.filters)
zip_base, zip_ext = MakeVersionedArchive(zip_file, version_suffix, options)
PruneOldArchives(staging_dir, zip_base, zip_ext)
@@ -349,6 +365,9 @@ def main(argv):
'always be included in the zip.'))
option_parser.add_option('--webkit-dir',
help='webkit directory path, relative to --src-dir')
+ option_parser.add_option('--filters', action='append', default=[],
+ help='Filters to apply to build zip '
+ '(avail: "asan").')
chromium_utils.AddPropertiesOptions(option_parser)
options, args = option_parser.parse_args(argv)
@@ -364,6 +383,10 @@ def main(argv):
if args[1:]:
print 'Warning -- unknown arguments' % args[1:]
+ if options.factory_properties.get('asan'):
+ options.filters.append('asan')
+ options.filters = set(options.filters)
+
return Archive(options)
if '__main__' == __name__:
« scripts/slave/chromium/win_apply_asan.py ('K') | « scripts/slave/chromium/win_apply_asan.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698