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

Side by Side Diff: tools/telemetry/telemetry/util/find_dependencies.py

Issue 1005903004: Revert of Refactor serving_dirs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « tools/telemetry/telemetry/util/cloud_storage_unittest.py ('k') | 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 # 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
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
94 97
95 98
96 def FindExcludedFiles(files, options): 99 def FindExcludedFiles(files, options):
97 def MatchesConditions(path, conditions): 100 def MatchesConditions(path, conditions):
98 for condition in conditions: 101 for condition in conditions:
99 if condition(path): 102 if condition(path):
100 return True 103 return True
101 return False 104 return False
102 105
103 # Define some filters for files. 106 # Define some filters for files.
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 255
253 def Run(self, args): 256 def Run(self, args):
254 paths = args.positional_args 257 paths = args.positional_args
255 dependencies = FindDependencies(paths, args) 258 dependencies = FindDependencies(paths, args)
256 if args.zip: 259 if args.zip:
257 ZipDependencies(paths, dependencies, args) 260 ZipDependencies(paths, dependencies, args)
258 print 'Zip archive written to %s.' % args.zip 261 print 'Zip archive written to %s.' % args.zip
259 else: 262 else:
260 print '\n'.join(sorted(dependencies)) 263 print '\n'.join(sorted(dependencies))
261 return 0 264 return 0
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/util/cloud_storage_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698