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

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

Issue 10973004: Clean up fifo logcat watcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
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:
« build/android/pylib/android_commands.py ('K') | « build/android/pylib/android_commands.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698