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

Side by Side Diff: presubmit_canned_checks.py

Issue 562031: Fix licensing headers and move most third party code to third_party/... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 10 years, 10 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
Property Changes:
Deleted: svn:executable
- *
OLDNEW
1 #!/usr/bin/env python 1 # Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 3 # found in the LICENSE file.
5 4
6 """Generic presubmit checks that can be reused by other presubmit checks.""" 5 """Generic presubmit checks that can be reused by other presubmit checks."""
7 6
8 ### Description checks 7 ### Description checks
9 8
10 def CheckChangeHasTestField(input_api, output_api): 9 def CheckChangeHasTestField(input_api, output_api):
11 """Requires that the changelist have a TEST= field.""" 10 """Requires that the changelist have a TEST= field."""
12 if input_api.change.TEST: 11 if input_api.change.TEST:
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 stderr=input_api.subprocess.PIPE) 404 stderr=input_api.subprocess.PIPE)
406 stdoutdata, stderrdata = subproc.communicate() 405 stdoutdata, stderrdata = subproc.communicate()
407 # Discard the output if returncode == 0 406 # Discard the output if returncode == 0
408 if subproc.returncode: 407 if subproc.returncode:
409 outputs.append("Test '%s' failed with code %d\n%s\n%s\n" % ( 408 outputs.append("Test '%s' failed with code %d\n%s\n%s\n" % (
410 unit_test_name, subproc.returncode, stdoutdata, stderrdata)) 409 unit_test_name, subproc.returncode, stdoutdata, stderrdata))
411 if outputs: 410 if outputs:
412 return [message_type("%d unit tests failed." % len(outputs), 411 return [message_type("%d unit tests failed." % len(outputs),
413 long_text='\n'.join(outputs))] 412 long_text='\n'.join(outputs))]
414 return [] 413 return []
OLDNEW
« no previous file with comments | « git-try ('k') | tests/README.gclient_test » ('j') | tests/gclient_scm_test.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698