Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1414)

Unified Diff: build/android/pylib/gtest/test_package_apk.py

Issue 1288993002: Revert of [Android] Remove android_commands and android_testrunner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/device/device_utils_test.py ('k') | build/android/pylib/instrumentation/test_runner.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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):
« no previous file with comments | « build/android/pylib/device/device_utils_test.py ('k') | build/android/pylib/instrumentation/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698