OLD | NEW |
---|---|
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import fnmatch | 5 import fnmatch |
6 import imp | 6 import imp |
7 import logging | 7 import logging |
8 import modulefinder | 8 import modulefinder |
9 import optparse | 9 import optparse |
10 import os | 10 import os |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
84 | 84 |
85 # Page set paths are relative to their runner script, not relative to us. | 85 # Page set paths are relative to their runner script, not relative to us. |
86 util.GetBaseDir = lambda: base_dir | 86 util.GetBaseDir = lambda: base_dir |
87 # TODO: Loading the page set will automatically download its Cloud Storage | 87 # TODO: Loading the page set will automatically download its Cloud Storage |
88 # deps. This is really expensive, and we don't want to do this by default. | 88 # deps. This is really expensive, and we don't want to do this by default. |
89 page_set = test_obj.CreatePageSet(options) | 89 page_set = test_obj.CreatePageSet(options) |
90 | 90 |
91 # Add all of its serving_dirs as dependencies. | 91 # Add all of its serving_dirs as dependencies. |
92 for serving_dir in page_set.serving_dirs: | 92 for serving_dir in page_set.serving_dirs: |
93 yield serving_dir | 93 yield serving_dir |
94 for page in page_set: | |
95 if page.is_file: | |
96 yield page.serving_dir | |
nednguyen
2015/02/03 01:37:37
What is this change for?
aiolos (Not reviewing)
2015/02/03 02:35:36
The only time we ever use the serving_dir of a pag
| |
97 | 94 |
98 | 95 |
99 def FindExcludedFiles(files, options): | 96 def FindExcludedFiles(files, options): |
100 def MatchesConditions(path, conditions): | 97 def MatchesConditions(path, conditions): |
101 for condition in conditions: | 98 for condition in conditions: |
102 if condition(path): | 99 if condition(path): |
103 return True | 100 return True |
104 return False | 101 return False |
105 | 102 |
106 # Define some filters for files. | 103 # Define some filters for files. |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
255 | 252 |
256 def Run(self, args): | 253 def Run(self, args): |
257 paths = args.positional_args | 254 paths = args.positional_args |
258 dependencies = FindDependencies(paths, args) | 255 dependencies = FindDependencies(paths, args) |
259 if args.zip: | 256 if args.zip: |
260 ZipDependencies(paths, dependencies, args) | 257 ZipDependencies(paths, dependencies, args) |
261 print 'Zip archive written to %s.' % args.zip | 258 print 'Zip archive written to %s.' % args.zip |
262 else: | 259 else: |
263 print '\n'.join(sorted(dependencies)) | 260 print '\n'.join(sorted(dependencies)) |
264 return 0 | 261 return 0 |
OLD | NEW |