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

Side by Side Diff: tools/presubmit.py

Issue 2818563005: [test] Fix presubmit for new dependency (Closed)
Patch Set: Created 3 years, 8 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 # 2 #
3 # Copyright 2012 the V8 project authors. All rights reserved. 3 # Copyright 2012 the V8 project authors. All rights reserved.
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 self.IsRelevant(f.LocalPath()) and 186 self.IsRelevant(f.LocalPath()) and
187 all(not self.IgnoreDir(d) for d in dirs(f.LocalPath())) and 187 all(not self.IgnoreDir(d) for d in dirs(f.LocalPath())) and
188 any(map(f.LocalPath().startswith, search_paths))) 188 any(map(f.LocalPath().startswith, search_paths)))
189 ] 189 ]
190 190
191 return self.ProcessFiles(all_files) 191 return self.ProcessFiles(all_files)
192 192
193 def IgnoreDir(self, name): 193 def IgnoreDir(self, name):
194 return (name.startswith('.') or 194 return (name.startswith('.') or
195 name in ('buildtools', 'data', 'gmock', 'gtest', 'kraken', 195 name in ('buildtools', 'data', 'gmock', 'gtest', 'kraken',
196 'octane', 'sunspider')) 196 'octane', 'sunspider', 'traces-arm64'))
197 197
198 def IgnoreFile(self, name): 198 def IgnoreFile(self, name):
199 return name.startswith('.') 199 return name.startswith('.')
200 200
201 def FindFilesIn(self, path): 201 def FindFilesIn(self, path):
202 result = [] 202 result = []
203 for (root, dirs, files) in os.walk(path): 203 for (root, dirs, files) in os.walk(path):
204 for ignored in [x for x in dirs if self.IgnoreDir(x)]: 204 for ignored in [x for x in dirs if self.IgnoreDir(x)]:
205 dirs.remove(ignored) 205 dirs.remove(ignored)
206 for file in files: 206 for file in files:
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 print "Running python tests..." 552 print "Running python tests..."
553 success &= PyTests(workspace) 553 success &= PyTests(workspace)
554 if success: 554 if success:
555 return 0 555 return 0
556 else: 556 else:
557 return 1 557 return 1
558 558
559 559
560 if __name__ == '__main__': 560 if __name__ == '__main__':
561 sys.exit(Main()) 561 sys.exit(Main())
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