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

Unified Diff: presubmit_canned_checks.py

Issue 6810012: Add verbose support throught presubmit checks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « git_cl.py ('k') | presubmit_support.py » ('j') | presubmit_support.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: presubmit_canned_checks.py
diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py
index e421bd750ef1a96b3b3fe505c9209bd8661447bd..0227e358d832fe284948098fddca2b48324641ea 100644
--- a/presubmit_canned_checks.py
+++ b/presubmit_canned_checks.py
@@ -411,8 +411,7 @@ def CheckTreeIsOpen(input_api, output_api,
def RunUnitTestsInDirectory(
- input_api, output_api, directory, whitelist=None, blacklist=None,
- verbose=False):
+ input_api, output_api, directory, whitelist=None, blacklist=None):
"""Lists all files in a directory and runs them. Doesn't recurse.
It's mainly a wrapper for RunUnitTests. USe whitelist and blacklist to filter
@@ -434,10 +433,10 @@ def RunUnitTestsInDirectory(
if blacklist and check(filename, blacklist):
continue
unit_tests.append(input_api.os_path.join(directory, filename))
- return RunUnitTests(input_api, output_api, unit_tests, verbose)
+ return RunUnitTests(input_api, output_api, unit_tests)
-def RunUnitTests(input_api, output_api, unit_tests, verbose=False):
+def RunUnitTests(input_api, output_api, unit_tests):
"""Runs all unit tests in a directory.
On Windows, sys.executable is used for unit tests ending with ".py".
@@ -455,10 +454,10 @@ def RunUnitTests(input_api, output_api, unit_tests, verbose=False):
# Windows needs some help.
cmd = [input_api.python_executable]
cmd.append(unit_test)
- if verbose:
+ if input_api.verbose:
print('Running %s' % unit_test)
try:
- if verbose:
+ if input_api.verbose:
input_api.subprocess.check_call(cmd, cwd=input_api.PresubmitLocalPath())
else:
input_api.subprocess.check_output(
« no previous file with comments | « git_cl.py ('k') | presubmit_support.py » ('j') | presubmit_support.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698