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

Unified Diff: presubmit_canned_checks.py

Issue 7860041: Update subprocess2.check_output() to behave like subprocess.check_output(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: update comment and docstring, they were unclear 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gclient_scm.py ('k') | scm.py » ('j') | no next file with comments »
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 0b79fc00be6206935f78b3c89aba2600762481e3..aeb2711451df919ab61256106b315de4bbe7b49a 100644
--- a/presubmit_canned_checks.py
+++ b/presubmit_canned_checks.py
@@ -515,7 +515,9 @@ def RunUnitTests(input_api, output_api, unit_tests):
input_api.subprocess.check_call(cmd, cwd=input_api.PresubmitLocalPath())
else:
input_api.subprocess.check_output(
- cmd, cwd=input_api.PresubmitLocalPath())
+ cmd,
+ stderr=input_api.subprocess.STDOUT,
+ cwd=input_api.PresubmitLocalPath())
except (OSError, input_api.subprocess.CalledProcessError), e:
results.append(message_type('%s failed!\n%s' % (unit_test, e)))
return results
@@ -558,7 +560,8 @@ def RunPythonUnitTests(input_api, output_api, unit_tests):
env['PYTHONPATH'] = input_api.os_path.pathsep.join((backpath))
cmd = [input_api.python_executable, '-m', '%s' % unit_test]
try:
- input_api.subprocess.check_output(cmd, cwd=cwd, env=env)
+ input_api.subprocess.check_output(
+ cmd, stderr=input_api.subprocess.STDOUT, cwd=cwd, env=env)
except (OSError, input_api.subprocess.CalledProcessError), e:
results.append(message_type('%s failed!\n%s' % (unit_test_name, e)))
return results
« no previous file with comments | « gclient_scm.py ('k') | scm.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698