diff --git a/android/apk_operations.py b/android/apk_operations.py index 1d657611c..78400c7a1 100755 --- a/android/apk_operations.py +++ b/android/apk_operations.py @@ -679,16 +679,16 @@ class _LogcatProcessor(object): # pylint:disable=no-self-use if dim: return '' - style = '' + style = colorama.Fore.BLACK if priority == 'E' or priority == 'F': - style = colorama.Back.RED + style += colorama.Back.RED elif priority == 'W': - style = colorama.Back.YELLOW + style += colorama.Back.YELLOW elif priority == 'I': - style = colorama.Back.GREEN + style += colorama.Back.GREEN elif priority == 'D': - style = colorama.Back.BLUE - return style + colorama.Fore.BLACK + style += colorama.Back.BLUE + return style def _ParseLine(self, line): tokens = line.split(None, 6) @@ -715,7 +715,7 @@ class _LogcatProcessor(object): date, invokation_time, pid, tid, priority, tag, original_message) def _PrintParsedLine(self, parsed_line, dim=False): - tid_style = '' + tid_style = colorama.Style.NORMAL # Make the main thread bright. if not dim and parsed_line.pid == parsed_line.tid: tid_style = colorama.Style.BRIGHT diff --git a/android/pylib/local/device/local_device_environment.py b/android/pylib/local/device/local_device_environment.py index 4d7aa82ad..bb958140c 100644 --- a/android/pylib/local/device/local_device_environment.py +++ b/android/pylib/local/device/local_device_environment.py @@ -152,7 +152,7 @@ class LocalDeviceEnvironment(environment.Environment): @handle_shard_failures_with(on_failure=self.BlacklistDevice) def prepare_device(d): - d.WaitUntilFullyBooted() + d.WaitUntilFullyBooted(timeout=120) if self._enable_device_cache: cache_path = _DeviceCachePath(d) diff --git a/android/pylib/valgrind_tools.py b/android/pylib/valgrind_tools.py index 9fdaddb7d..4689dc384 100644 --- a/android/pylib/valgrind_tools.py +++ b/android/pylib/valgrind_tools.py @@ -6,15 +6,11 @@ from __future__ import print_function -import glob import logging -import os.path -import subprocess import sys from devil.android import device_errors from devil.android.valgrind_tools import base_tool -from pylib.constants import DIR_SOURCE_ROOT def SetChromeTimeoutScale(device, scale): @@ -44,19 +40,7 @@ class AddressSanitizerTool(base_tool.BaseTool): @classmethod def CopyFiles(cls, device): """Copies ASan tools to the device.""" - libs = glob.glob(os.path.join(DIR_SOURCE_ROOT, - 'third_party/llvm-build/Release+Asserts/', - 'lib/clang/*/lib/linux/', - 'libclang_rt.asan-arm-android.so')) - assert len(libs) == 1 - subprocess.call( - [os.path.join( - DIR_SOURCE_ROOT, - 'tools/android/asan/third_party/asan_device_setup.sh'), - '--device', str(device), - '--lib', libs[0], - '--extra-options', AddressSanitizerTool.EXTRA_OPTIONS]) - device.WaitUntilFullyBooted() + del device def GetTestWrapper(self): return AddressSanitizerTool.WRAPPER_NAME