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

Side by Side Diff: tools/presubmit.py

Issue 454693004: Skip gmock and gtest in presubmit. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 def Run(self, path): 193 def Run(self, path):
194 all_files = [] 194 all_files = []
195 for file in self.GetPathsToSearch(): 195 for file in self.GetPathsToSearch():
196 all_files += self.FindFilesIn(join(path, file)) 196 all_files += self.FindFilesIn(join(path, file))
197 if not self.ProcessFiles(all_files, path): 197 if not self.ProcessFiles(all_files, path):
198 return False 198 return False
199 return True 199 return True
200 200
201 def IgnoreDir(self, name): 201 def IgnoreDir(self, name):
202 return (name.startswith('.') or 202 return (name.startswith('.') or
203 name in ('buildtools', 'data', 'kraken', 'octane', 'sunspider')) 203 name in ('buildtools', 'data', 'gmock', 'gtest', 'kraken',
204 'octane', 'sunspider'))
204 205
205 def IgnoreFile(self, name): 206 def IgnoreFile(self, name):
206 return name.startswith('.') 207 return name.startswith('.')
207 208
208 def FindFilesIn(self, path): 209 def FindFilesIn(self, path):
209 result = [] 210 result = []
210 for (root, dirs, files) in os.walk(path): 211 for (root, dirs, files) in os.walk(path):
211 for ignored in [x for x in dirs if self.IgnoreDir(x)]: 212 for ignored in [x for x in dirs if self.IgnoreDir(x)]:
212 dirs.remove(ignored) 213 dirs.remove(ignored)
213 for file in files: 214 for file in files:
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 success = CheckGeneratedRuntimeTests(workspace) and success 454 success = CheckGeneratedRuntimeTests(workspace) and success
454 success = CheckExternalReferenceRegistration(workspace) and success 455 success = CheckExternalReferenceRegistration(workspace) and success
455 if success: 456 if success:
456 return 0 457 return 0
457 else: 458 else:
458 return 1 459 return 1
459 460
460 461
461 if __name__ == '__main__': 462 if __name__ == '__main__':
462 sys.exit(Main()) 463 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