Index: build/android/pylib/test_package_apk.py |
diff --git a/build/android/pylib/test_package_apk.py b/build/android/pylib/test_package_apk.py |
index 5c633cc543923e7a34c1c376fee4675a16d73094..dd264e2c9641ca5bd8d2c3162ec170aa661f577f 100644 |
--- a/build/android/pylib/test_package_apk.py |
+++ b/build/android/pylib/test_package_apk.py |
@@ -4,19 +4,16 @@ |
import os |
-import re |
-import sys |
- |
-import cmd_helper |
-import constants |
-import logging |
import pexpect |
import shlex |
-import shutil |
+import sys |
import tempfile |
-from test_package import TestPackage |
import time |
+import android_commands |
+import constants |
+from test_package import TestPackage |
+ |
class TestPackageApk(TestPackage): |
"""A helper class for running APK-based native tests. |
@@ -72,7 +69,8 @@ class TestPackageApk(TestPackage): |
raise Exception('Unable to find fifo on device %s ' % self._GetFifo()) |
args = shlex.split(self.adb.Adb()._target_arg) |
args += ['shell', 'cat', self._GetFifo()] |
- return pexpect.spawn('adb', args, timeout=timeout, logfile=sys.stdout) |
+ logfile = android_commands.NewLineNormalizer(sys.stdout) |
+ return pexpect.spawn('adb', args, timeout=timeout, logfile=logfile) |
def GetAllTests(self): |
"""Returns a list of all tests available in the test suite.""" |
@@ -97,8 +95,8 @@ class TestPackageApk(TestPackage): |
return ret |
def CreateTestRunnerScript(self, gtest_filter, test_arguments): |
- self._CreateTestRunnerScript('--gtest_filter=%s %s' % (gtest_filter, |
- test_arguments)) |
+ self._CreateTestRunnerScript('--gtest_filter=%s %s' % (gtest_filter, |
+ test_arguments)) |
def RunTestsAndListResults(self): |
try: |