From 9015c78b0a9f65beec1d441d5f9fc93b061db662 Mon Sep 17 00:00:00 2001 From: John Budorick Date: Wed, 15 May 2019 17:18:48 +0000 Subject: [PATCH] Rework asan_device_setup gn target for arm64. asan_device_setup needs both the 32-bit and 64-bit libs on aarch64 and can accept the lib directory in both the 32-bit and 64-bit cases. Bug: 790202 Change-Id: I355ef4162fa890d4189e5f860f442233fc732dd1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1612092 Commit-Queue: John Budorick Reviewed-by: Ben Pastene Cr-Original-Commit-Position: refs/heads/master@{#659986} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: b6d2bea5071f07514ca1686d1a220c0e5593b4db --- android/apk_operations.py | 14 +++++++------- .../local/device/local_device_environment.py | 2 +- android/pylib/valgrind_tools.py | 18 +----------------- 3 files changed, 9 insertions(+), 25 deletions(-) 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