| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Provides an interface to communicate with the device via the adb command. | 5 """Provides an interface to communicate with the device via the adb command. |
| 6 | 6 |
| 7 Assumes adb binary is currently on system path. | 7 Assumes adb binary is currently on system path. |
| 8 """ | 8 """ |
| 9 | 9 |
| 10 import collections | 10 import collections |
| 11 import datetime | 11 import datetime |
| 12 import logging | 12 import logging |
| 13 import os | 13 import os |
| 14 import re | 14 import re |
| 15 import shlex | 15 import shlex |
| 16 import subprocess | 16 import subprocess |
| 17 import sys | 17 import sys |
| 18 import tempfile | 18 import tempfile |
| 19 import time | 19 import time |
| 20 | 20 |
| 21 import pexpect | |
| 22 import io_stats_parser | 21 import io_stats_parser |
| 22 from pylib import pexpect |
| 23 | 23 |
| 24 CHROME_SRC = os.path.join( | 24 CHROME_SRC = os.path.join( |
| 25 os.path.abspath(os.path.dirname(__file__)), '..', '..', '..') | 25 os.path.abspath(os.path.dirname(__file__)), '..', '..', '..') |
| 26 | 26 |
| 27 sys.path.append(os.path.join(CHROME_SRC, 'third_party', 'android_testrunner')) | 27 sys.path.append(os.path.join(CHROME_SRC, 'third_party', 'android_testrunner')) |
| 28 import adb_interface | 28 import adb_interface |
| 29 | 29 |
| 30 import cmd_helper | 30 import cmd_helper |
| 31 import errors # is under ../../../third_party/android_testrunner/errors.py | 31 import errors # is under ../../../third_party/android_testrunner/errors.py |
| 32 | 32 |
| (...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1062 def __init__(self, output): | 1062 def __init__(self, output): |
| 1063 self._output = output | 1063 self._output = output |
| 1064 | 1064 |
| 1065 def write(self, data): | 1065 def write(self, data): |
| 1066 data = data.replace('\r\r\n', '\n') | 1066 data = data.replace('\r\r\n', '\n') |
| 1067 self._output.write(data) | 1067 self._output.write(data) |
| 1068 | 1068 |
| 1069 def flush(self): | 1069 def flush(self): |
| 1070 self._output.flush() | 1070 self._output.flush() |
| 1071 | 1071 |
| OLD | NEW |