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

Unified Diff: build/android/pylib/cmd_helper.py

Issue 13601030: [android] Improve logging output. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: old Python compatability Created 7 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 | build/android/pylib/utils/run_tests_helper.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/cmd_helper.py
diff --git a/build/android/pylib/cmd_helper.py b/build/android/pylib/cmd_helper.py
index b6bbac7b0f170f174000198e0f1f5fd1200997e4..6dcc911d6287c10d80f53bfe2a5fc8883fa21c90 100644
--- a/build/android/pylib/cmd_helper.py
+++ b/build/android/pylib/cmd_helper.py
@@ -10,6 +10,7 @@ import subprocess
import constants
+
def RunCmd(args, cwd=None):
"""Opens a subprocess to execute a program and returns its return value.
@@ -23,8 +24,7 @@ def RunCmd(args, cwd=None):
Return code from the command execution.
"""
logging.info(str(args) + ' ' + (cwd or ''))
- p = subprocess.Popen(args=args, cwd=cwd)
- return p.wait()
+ return subprocess.call(args, cwd=cwd)
def GetCmdOutput(args, cwd=None, shell=False):
@@ -44,6 +44,7 @@ def GetCmdOutput(args, cwd=None, shell=False):
(_, output) = GetCmdStatusAndOutput(args, cwd, shell)
return output
+
def GetCmdStatusAndOutput(args, cwd=None, shell=False):
"""Executes a subprocess and returns its exit code and output.
@@ -67,6 +68,7 @@ def GetCmdStatusAndOutput(args, cwd=None, shell=False):
logging.info(stdout[:4096]) # Truncate output longer than 4k.
return (exit_code, stdout)
+
class OutDirectory(object):
_out_directory = os.path.join(constants.CHROME_DIR, 'out')
@staticmethod
« no previous file with comments | « no previous file | build/android/pylib/utils/run_tests_helper.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698