summaryrefslogtreecommitdiff
path: root/third_party/android_testrunner/run_command.py
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/android_testrunner/run_command.py')
-rw-r--r--third_party/android_testrunner/run_command.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/third_party/android_testrunner/run_command.py b/third_party/android_testrunner/run_command.py
index 6b84156fe0..5c82c61210 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))