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

Side by Side Diff: tools/presubmit.py

Issue 448603002: Refactor unit tests for the base library to use GTest. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Reduce LoopIncrement test time. 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
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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 return (super(CppLintProcessor, self).IgnoreDir(name) 228 return (super(CppLintProcessor, self).IgnoreDir(name)
229 or (name == 'third_party')) 229 or (name == 'third_party'))
230 230
231 IGNORE_LINT = ['flag-definitions.h'] 231 IGNORE_LINT = ['flag-definitions.h']
232 232
233 def IgnoreFile(self, name): 233 def IgnoreFile(self, name):
234 return (super(CppLintProcessor, self).IgnoreFile(name) 234 return (super(CppLintProcessor, self).IgnoreFile(name)
235 or (name in CppLintProcessor.IGNORE_LINT)) 235 or (name in CppLintProcessor.IGNORE_LINT))
236 236
237 def GetPathsToSearch(self): 237 def GetPathsToSearch(self):
238 return ['src', 'include', 'samples', join('test', 'cctest')] 238 return ['src', 'include', 'samples',
239 join('test', 'base-unittests'),
240 join('test', 'cctest')]
239 241
240 def GetCpplintScript(self, prio_path): 242 def GetCpplintScript(self, prio_path):
241 for path in [prio_path] + os.environ["PATH"].split(os.pathsep): 243 for path in [prio_path] + os.environ["PATH"].split(os.pathsep):
242 path = path.strip('"') 244 path = path.strip('"')
243 cpplint = os.path.join(path, "cpplint.py") 245 cpplint = os.path.join(path, "cpplint.py")
244 if os.path.isfile(cpplint): 246 if os.path.isfile(cpplint):
245 return cpplint 247 return cpplint
246 248
247 return None 249 return None
248 250
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 success = CheckGeneratedRuntimeTests(workspace) and success 452 success = CheckGeneratedRuntimeTests(workspace) and success
451 success = CheckExternalReferenceRegistration(workspace) and success 453 success = CheckExternalReferenceRegistration(workspace) and success
452 if success: 454 if success:
453 return 0 455 return 0
454 else: 456 else:
455 return 1 457 return 1
456 458
457 459
458 if __name__ == '__main__': 460 if __name__ == '__main__':
459 sys.exit(Main()) 461 sys.exit(Main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698