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

Side by Side Diff: scripts/slave/zip_build.py

Issue 1752143002: Add gen/device to the list of paths searched for Mojo bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 9 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """ Creates a zip file in the staging dir with the result of a compile. 6 """ Creates a zip file in the staging dir with the result of a compile.
7 It can be sent to other machines for testing. 7 It can be sent to other machines for testing.
8 """ 8 """
9 9
10 import csv 10 import csv
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 """Lists all mojom files that need to be included in the archive. 113 """Lists all mojom files that need to be included in the archive.
114 114
115 Args: 115 Args:
116 build_dir: The build directory. 116 build_dir: The build directory.
117 117
118 Returns: 118 Returns:
119 A list of mojom file paths which are relative to the build 119 A list of mojom file paths which are relative to the build
120 directory. 120 directory.
121 """ 121 """
122 walk_dirs = [ 122 walk_dirs = [
123 'gen/content/test/data',
124 'gen/device',
123 'gen/mojo', 125 'gen/mojo',
124 'gen/content/test/data',
125 ] 126 ]
126 mojom_files = [] 127 mojom_files = []
127 for walk_dir in walk_dirs: 128 for walk_dir in walk_dirs:
128 walk_dir = os.path.join(build_dir, walk_dir) 129 walk_dir = os.path.join(build_dir, walk_dir)
129 for path, _, files in os.walk(walk_dir): 130 for path, _, files in os.walk(walk_dir):
130 rel_path = os.path.relpath(path, build_dir) 131 rel_path = os.path.relpath(path, build_dir)
131 for suffix in suffixes or []: 132 for suffix in suffixes or []:
132 for mojom_file in fnmatch.filter(files, '*%s' % suffix): 133 for mojom_file in fnmatch.filter(files, '*%s' % suffix):
133 mojom_files.append(os.path.join(rel_path, mojom_file)) 134 mojom_files.append(os.path.join(rel_path, mojom_file))
134 return mojom_files 135 return mojom_files
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 # first unknown arg. So throw a warning if we have two or more unknown 450 # first unknown arg. So throw a warning if we have two or more unknown
450 # arguments. 451 # arguments.
451 if args[1:]: 452 if args[1:]:
452 print 'Warning -- unknown arguments' % args[1:] 453 print 'Warning -- unknown arguments' % args[1:]
453 454
454 return Archive(options) 455 return Archive(options)
455 456
456 457
457 if '__main__' == __name__: 458 if '__main__' == __name__:
458 sys.exit(main(sys.argv)) 459 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698