Index: build/android/pylib/gtest/test_package_apk.py |
diff --git a/build/android/pylib/gtest/test_package_apk.py b/build/android/pylib/gtest/test_package_apk.py |
index 1bf391376c53c7d468deba9e33ac3596d3547139..b67cef1f16f651359d8c2ee5b50f6c2757119aaa 100644 |
--- a/build/android/pylib/gtest/test_package_apk.py |
+++ b/build/android/pylib/gtest/test_package_apk.py |
@@ -14,6 +14,7 @@ |
import tempfile |
import time |
+from pylib import android_commands |
from pylib import constants |
from pylib import pexpect |
from pylib.device import device_errors |
@@ -70,7 +71,8 @@ |
else: |
raise device_errors.DeviceUnreachableError( |
'Unable to find fifo on device %s ' % self._GetFifo()) |
- args = ['-s', device.adb.GetDeviceSerial(), 'shell', 'cat', self._GetFifo()] |
+ args = shlex.split(device.old_interface.Adb()._target_arg) |
+ args += ['shell', 'cat', self._GetFifo()] |
return pexpect.spawn('adb', args, timeout=timeout, logfile=logfile) |
def _StartActivity(self, device, force_stop=True): |
@@ -141,19 +143,8 @@ |
self._StartActivity(device, force_stop=False) |
finally: |
self.tool.CleanUpEnvironment() |
- logfile = self._NewLineNormalizer(sys.stdout) |
+ logfile = android_commands.NewLineNormalizer(sys.stdout) |
return self._WatchFifo(device, timeout=10, logfile=logfile) |
- |
- class _NewLineNormalizer(object): |
- def __init__(self, output): |
- self._output = output |
- |
- def write(self, data): |
- data = data.replace('\r\r\n', '\n') |
- self._output.write(data) |
- |
- def flush(self): |
- self._output.flush() |
#override |
def Install(self, device): |