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

Unified Diff: PRESUBMIT.py

Issue 6810012: Add verbose support throught presubmit checks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: merge error 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 | « no previous file | git_cl.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PRESUBMIT.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index a3aad5061884ce6b30e6984df9e4c49fb59e8862..d09c7ae2ff3d9dfc5e2d122424a670117cfaa939 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -37,18 +37,16 @@ def CommonChecks(input_api, output_api):
# TODO(maruel): Make sure at least one file is modified first.
# TODO(maruel): If only tests are modified, only run them.
- verbose = False
results.extend(input_api.canned_checks.RunUnitTestsInDirectory(
input_api,
output_api,
'tests',
- whitelist=[r'.*test\.py$'],
- verbose=verbose))
- results.extend(RunGitClTests(input_api, output_api, verbose=verbose))
+ whitelist=[r'.*test\.py$']))
+ results.extend(RunGitClTests(input_api, output_api))
return results
-def RunGitClTests(input_api, output_api, verbose):
+def RunGitClTests(input_api, output_api):
"""Run all the shells scripts in the directory test.
"""
if input_api.platform == 'win32':
@@ -81,7 +79,7 @@ def RunGitClTests(input_api, output_api, verbose):
print('Running %s' % test)
try:
- if verbose:
+ if input_api.verbose:
input_api.subprocess.check_call(
[input_api.os_path.join(test_path, test)], cwd=test_path)
else:
« no previous file with comments | « no previous file | git_cl.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698