Commit 906a32fc authored by John Budorick's avatar John Budorick Committed by Commit Bot

android: hide //third_party/android_platform dep behind build_with_chromium.

Bug: 978773
Change-Id: I4bac604cee157374b9338066d55a262d3fb713a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1678281
Commit-Queue: John Budorick <jbudorick@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Auto-Submit: John Budorick <jbudorick@chromium.org>
Reviewed-by: default avatarBen Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/master@{#672530}
parent 0be303ea
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
import("//build/config/android/config.gni") import("//build/config/android/config.gni")
import("//build/config/android/rules.gni") import("//build/config/android/rules.gni")
import("//build/config/gclient_args.gni")
import("//build/config/python.gni") import("//build/config/python.gni")
if (enable_java_templates) { if (enable_java_templates) {
...@@ -87,8 +88,11 @@ python_library("test_runner_py") { ...@@ -87,8 +88,11 @@ python_library("test_runner_py") {
] ]
data_deps = [ data_deps = [
":devil_chromium_py", ":devil_chromium_py",
"//third_party/android_platform/development/scripts:stack_py",
] ]
if (build_with_chromium) {
data_deps +=
[ "//third_party/android_platform/development/scripts:stack_py" ]
}
if (is_asan) { if (is_asan) {
data_deps += [ "//tools/android/asan/third_party:asan_device_setup" ] data_deps += [ "//tools/android/asan/third_party:asan_device_setup" ]
} }
......
...@@ -18,13 +18,13 @@ ABI_REG = re.compile('ABI: \'(.+?)\'') ...@@ -18,13 +18,13 @@ ABI_REG = re.compile('ABI: \'(.+?)\'')
def _DeviceAbiToArch(device_abi): def _DeviceAbiToArch(device_abi):
# The order of this list is significant to find the more specific match # The order of this list is significant to find the more specific match
# (e.g., arm64) before the less specific (e.g., arm). # (e.g., arm64) before the less specific (e.g., arm).
arches = ['arm64', 'arm', 'x86_64', 'x86_64', 'x86', 'mips'] arches = ['arm64', 'arm', 'x86_64', 'x86_64', 'x86', 'mips']
for arch in arches: for arch in arches:
if arch in device_abi: if arch in device_abi:
return arch return arch
raise RuntimeError('Unknown device ABI: %s' % device_abi) raise RuntimeError('Unknown device ABI: %s' % device_abi)
class Symbolizer(object): class Symbolizer(object):
...@@ -58,6 +58,11 @@ class Symbolizer(object): ...@@ -58,6 +58,11 @@ class Symbolizer(object):
Yields: Yields:
A string for each line of resolved stack output. A string for each line of resolved stack output.
""" """
if not os.path.exists(_STACK_TOOL):
logging.warning('%s missing. Unable to resolve native stack traces.',
_STACK_TOOL)
return
arch = _DeviceAbiToArch(device_abi) arch = _DeviceAbiToArch(device_abi)
if not arch: if not arch:
logging.warning('No device_abi can be found.') logging.warning('No device_abi can be found.')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment