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

Side by Side Diff: tools/presubmit.py

Issue 441983002: Check that external references are registered in the serializer. (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 | « tools/external-reference-check.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 #!/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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 return success 416 return success
417 417
418 418
419 def CheckGeneratedRuntimeTests(workspace): 419 def CheckGeneratedRuntimeTests(workspace):
420 code = subprocess.call( 420 code = subprocess.call(
421 [sys.executable, join(workspace, "tools", "generate-runtime-tests.py"), 421 [sys.executable, join(workspace, "tools", "generate-runtime-tests.py"),
422 "check"]) 422 "check"])
423 return code == 0 423 return code == 0
424 424
425 425
426 def CheckExternalReferenceRegistration(workspace):
427 code = subprocess.call(
428 [sys.executable, join(workspace, "tools", "external-reference-check.py")])
429 return code == 0
430
431
426 def GetOptions(): 432 def GetOptions():
427 result = optparse.OptionParser() 433 result = optparse.OptionParser()
428 result.add_option('--no-lint', help="Do not run cpplint", default=False, 434 result.add_option('--no-lint', help="Do not run cpplint", default=False,
429 action="store_true") 435 action="store_true")
430 return result 436 return result
431 437
432 438
433 def Main(): 439 def Main():
434 workspace = abspath(join(dirname(sys.argv[0]), '..')) 440 workspace = abspath(join(dirname(sys.argv[0]), '..'))
435 parser = GetOptions() 441 parser = GetOptions()
436 (options, args) = parser.parse_args() 442 (options, args) = parser.parse_args()
437 success = True 443 success = True
438 print "Running C++ lint check..." 444 print "Running C++ lint check..."
439 if not options.no_lint: 445 if not options.no_lint:
440 success = CppLintProcessor().Run(workspace) and success 446 success = CppLintProcessor().Run(workspace) and success
441 print "Running copyright header, trailing whitespaces and " \ 447 print "Running copyright header, trailing whitespaces and " \
442 "two empty lines between declarations check..." 448 "two empty lines between declarations check..."
443 success = SourceProcessor().Run(workspace) and success 449 success = SourceProcessor().Run(workspace) and success
444 success = CheckGeneratedRuntimeTests(workspace) and success 450 success = CheckGeneratedRuntimeTests(workspace) and success
451 success = CheckExternalReferenceRegistration(workspace) and success
445 if success: 452 if success:
446 return 0 453 return 0
447 else: 454 else:
448 return 1 455 return 1
449 456
450 457
451 if __name__ == '__main__': 458 if __name__ == '__main__':
452 sys.exit(Main()) 459 sys.exit(Main())
OLDNEW
« no previous file with comments | « tools/external-reference-check.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698