| Index: scripts/slave/zip_build.py
|
| diff --git a/scripts/slave/zip_build.py b/scripts/slave/zip_build.py
|
| index 5047ec3919ed4201d0afdc898f910e418d136ff9..5c2da43d4d13bd48737af657efaec1f172ad0503 100755
|
| --- a/scripts/slave/zip_build.py
|
| +++ b/scripts/slave/zip_build.py
|
| @@ -141,28 +141,29 @@ def FileRegexBlacklist(options):
|
| return '$NO_FILTER^'
|
|
|
|
|
| -def MojomJSFiles(build_dir):
|
| - """Lists all mojom JavaScript files that need to be included in the archive.
|
| +def _MojomFiles(build_dir, suffixes):
|
| + """Lists all mojom files that need to be included in the archive.
|
|
|
| Args:
|
| build_dir: The build directory.
|
|
|
| Returns:
|
| - A list of mojom JavaScript file paths which are relative to the build
|
| + A list of mojom file paths which are relative to the build
|
| directory.
|
| """
|
| walk_dirs = [
|
| 'gen/mojo',
|
| 'gen/content/test/data',
|
| ]
|
| - mojom_js_files = []
|
| + mojom_files = []
|
| for walk_dir in walk_dirs:
|
| walk_dir = os.path.join(build_dir, walk_dir)
|
| for path, _, files in os.walk(walk_dir):
|
| rel_path = os.path.relpath(path, build_dir)
|
| - for mojom_js_file in fnmatch.filter(files, '*.mojom.js'):
|
| - mojom_js_files.append(os.path.join(rel_path, mojom_js_file))
|
| - return mojom_js_files
|
| + for suffix in suffixes or []:
|
| + for mojom_file in fnmatch.filter(files, '*%s' % suffix):
|
| + mojom_files.append(os.path.join(rel_path, mojom_file))
|
| + return mojom_files
|
|
|
|
|
| def WriteRevisionFile(dirname, build_revision):
|
| @@ -371,9 +372,9 @@ def Archive(options):
|
|
|
| # TODO(yzshen): Once we have swarming support ready, we could use it to
|
| # archive run time dependencies of tests and remove this step.
|
| - mojom_js_files = MojomJSFiles(build_dir)
|
| - print 'Include mojom JavaScript files: %s' % mojom_js_files
|
| - zip_file_list.extend(mojom_js_files)
|
| + mojom_files = _MojomFiles(build_dir, ['.mojom.js', '_mojom.py'])
|
| + print 'Include mojom files: %s' % mojom_files
|
| + zip_file_list.extend(mojom_files)
|
|
|
| zip_file = MakeUnversionedArchive(build_dir, staging_dir, zip_file_list,
|
| unversioned_base_name, options.path_filter)
|
|
|