Index: third_party/android_testrunner/run_command.py |
diff --git a/third_party/android_testrunner/run_command.py b/third_party/android_testrunner/run_command.py |
index 6b84156fe0e549b50a8a0c996e754b67e41cd799..5c82c61210de2e889e4dabf1868e09a323e6d5eb 100644 |
--- a/third_party/android_testrunner/run_command.py |
+++ b/third_party/android_testrunner/run_command.py |
@@ -22,6 +22,7 @@ import subprocess |
import tempfile |
import threading |
import time |
+import sys |
# local imports |
import errors |
@@ -93,12 +94,15 @@ def RunOnce(cmd, timeout_time=None, return_output=True, stdin_input=None): |
stdin_dest = subprocess.PIPE |
else: |
stdin_dest = None |
+ stderr_dest = subprocess.STDOUT |
+ if os.environ.get('ADB_TRACE'): |
+ stderr_dest = sys.stdout |
pipe = subprocess.Popen( |
cmd, |
executable='/bin/bash', |
stdin=stdin_dest, |
stdout=output_dest, |
- stderr=subprocess.STDOUT, |
+ stderr=stderr_dest, |
shell=True, close_fds=True, |
preexec_fn=lambda: signal.signal(signal.SIGPIPE, signal.SIG_DFL)) |