android: More cleanups of stack symbolization scripts.
symbol.py:
- Remove _GetChromeOutputDirCandidates() because the function
would normally always return a list with a single item, the
result of constants.GetOutDirectory().
Even in the case where none of CHROMIUM_OUTPUT_DIRECTORY
or BUILDTYPE are defined in the environment, it would
have reported a list with *two* default directories
(i.e. ["$OUT/Debug", "$OUT/Release"]), which is error
prone since one cannot assume that their content
corresponds to the same set of sources / DEPS, and hence
may lead to incorrect symbolization.
Besides, all high-level scripts that call into this one
already set these environment variables through
constants.SetBuildType() or constants.SetOutDirectory()
- Make the SECONDARY_ABI_OUTPUT_PATH variable private with
an underscore prefix, and improve the error message
in SetSecondaryAbiOutputPath().
- Remove the "$OUT/lib" paths from the result of
GetLibrarySearchPaths(), since GYP is not used anymore.
Update the comment that explains the library locations.
stack_core.py:
- Make a few functions private using an underscore prefix.
Also document the weird / error-prone behaviour of
_FindSharedLibraryFromAPKs().
Unfortunately, it is not trivial to pass a list of
APKs without introducing yet another global variable
(a better solution is planned in the future).
constants.py:
- Remove 'build_type' parameter from GetOutDirectory()
since its only user was removed (see above).
Also slightly improve the exception message when the method
is called without CHROMIUM_OUTPUT_DIR or BUILDTYPE being
defined.
- Remove obsolete SetBuildDirectory() function, since
there are no callers for it, and its usage is slightly
confusing with that of SetOutputDirectory() (!)
- Log a warning when SetBuildType() is called when
CHROMIUM_OUTPUT_DIR is already defined, because the value
will completely be ignored by GetOutDirectory().
- Remove GetBuildType() (no callers).
- Remove GetAdbPath(), code search reveals there are no
callers anymore for it :-)
Tested manually by running a few scripts, like
build/android/tombstones.py
BUG=NONE
R=agrieve@chromium.org,jbudorick@chromium.org,pasko@chromium.org
Change-Id: Icb38da2a6d5511aca4cb217abd6ac25f1cb313df
Reviewed-on: https://chromium-review.googlesource.com/1007280
Commit-Queue: David Turner <digit@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Reviewed-by: Egor Pasko <pasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551617}
CrOS-Libchrome-Original-Commit: 6eb70f42629daf1a38bc8efc7eaac15d00cb1471
1 file changed