diff options
author | bulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-07 12:45:25 +0000 |
---|---|---|
committer | bulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-07 12:45:25 +0000 |
commit | e1e9d3e88f03c049f62e363724289809cff2cb02 (patch) | |
tree | 6ee3f6ed595f345bd4e4bf6a5048fff3c9f2bf25 /third_party/android_testrunner/run_command.py | |
parent | 4db297efe991cafcd5125aad8f21ef448b905c38 (diff) | |
download | chromium_src-e1e9d3e88f03c049f62e363724289809cff2cb02.zip chromium_src-e1e9d3e88f03c049f62e363724289809cff2cb02.tar.gz chromium_src-e1e9d3e88f03c049f62e363724289809cff2cb02.tar.bz2 |
Enables (temporarily) adb trace for sharded perf tests.
This may help track down some issues with adb reliability:
- sharder: sets the env var that will be inherited by the child shards.
- run_command.py: redirect stderr (i.e., trace output) to stdout, otherwise
higher up layers get confused with the extra data.
It will be reverted soon after the data has been collected.
BUG=268450
Review URL: https://chromiumcodereview.appspot.com/22430003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216168 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/android_testrunner/run_command.py')
-rw-r--r-- | third_party/android_testrunner/run_command.py | 6 |
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 6b84156..5c82c61 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)) |