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

Side by Side Diff: presubmit_support.py

Issue 7906009: Fix a typo that resulted in no tests to be run in depot_tools. :( (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: More Created 9 years, 3 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 | « presubmit_canned_checks.py ('k') | tests/gcl_unittest.py » ('j') | 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 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Enables directory-specific presubmit checks to run at upload and/or commit. 6 """Enables directory-specific presubmit checks to run at upload and/or commit.
7 """ 7 """
8 8
9 __version__ = '1.6.1' 9 __version__ = '1.6.1'
10 10
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 1068
1069 output = PresubmitOutput(input_stream, output_stream) 1069 output = PresubmitOutput(input_stream, output_stream)
1070 if committing: 1070 if committing:
1071 output.write("Running presubmit commit checks ...\n") 1071 output.write("Running presubmit commit checks ...\n")
1072 else: 1072 else:
1073 output.write("Running presubmit upload checks ...\n") 1073 output.write("Running presubmit upload checks ...\n")
1074 start_time = time.time() 1074 start_time = time.time()
1075 presubmit_files = ListRelevantPresubmitFiles( 1075 presubmit_files = ListRelevantPresubmitFiles(
1076 change.AbsoluteLocalPaths(True), change.RepositoryRoot()) 1076 change.AbsoluteLocalPaths(True), change.RepositoryRoot())
1077 if not presubmit_files and verbose: 1077 if not presubmit_files and verbose:
1078 output.write("Warning, no presubmit.py found.\n") 1078 output.write("Warning, no PRESUBMIT.py found.\n")
1079 results = [] 1079 results = []
1080 executer = PresubmitExecuter(change, committing, rietveld_obj, verbose) 1080 executer = PresubmitExecuter(change, committing, rietveld_obj, verbose)
1081 if default_presubmit: 1081 if default_presubmit:
1082 if verbose: 1082 if verbose:
1083 output.write("Running default presubmit script.\n") 1083 output.write("Running default presubmit script.\n")
1084 fake_path = os.path.join(change.RepositoryRoot(), 'PRESUBMIT.py') 1084 fake_path = os.path.join(change.RepositoryRoot(), 'PRESUBMIT.py')
1085 results += executer.ExecPresubmitScript(default_presubmit, fake_path) 1085 results += executer.ExecPresubmitScript(default_presubmit, fake_path)
1086 for filename in presubmit_files: 1086 for filename in presubmit_files:
1087 filename = os.path.abspath(filename) 1087 filename = os.path.abspath(filename)
1088 if verbose: 1088 if verbose:
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 except PresubmitFailure, e: 1246 except PresubmitFailure, e:
1247 print >> sys.stderr, e 1247 print >> sys.stderr, e
1248 print >> sys.stderr, 'Maybe your depot_tools is out of date?' 1248 print >> sys.stderr, 'Maybe your depot_tools is out of date?'
1249 print >> sys.stderr, 'If all fails, contact maruel@' 1249 print >> sys.stderr, 'If all fails, contact maruel@'
1250 return 2 1250 return 2
1251 1251
1252 1252
1253 if __name__ == '__main__': 1253 if __name__ == '__main__':
1254 fix_encoding.fix_encoding() 1254 fix_encoding.fix_encoding()
1255 sys.exit(Main(None)) 1255 sys.exit(Main(None))
OLDNEW
« no previous file with comments | « presubmit_canned_checks.py ('k') | tests/gcl_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698