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

Unified Diff: third_party/android_platform/development/scripts/stack

Issue 1660693002: Add --output-dir flag to third_party/android_platform/development/scripts/stack (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: redo Created 4 years, 11 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: third_party/android_platform/development/scripts/stack
diff --git a/third_party/android_platform/development/scripts/stack b/third_party/android_platform/development/scripts/stack
index 6901ad5896e18dcbad99d557ecb489e0cf02922d..4c799d709f3de679861ef4d74f8223ec658ccf0d 100755
--- a/third_party/android_platform/development/scripts/stack
+++ b/third_party/android_platform/development/scripts/stack
@@ -28,6 +28,12 @@ import subprocess
import symbol
import sys
+sys.path.insert(0, os.path.join(os.path.dirname(__file__),
+ os.pardir, os.pardir, os.pardir, os.pardir,
+ 'build', 'android'))
+from pylib import constants
+
+
DEFAULT_SYMROOT='/tmp/symbols'
DEFAULT_APK_DIR='chrome_apk'
# From: https://source.android.com/source/build-numbers.html
@@ -45,8 +51,10 @@ def PrintUsage():
print " --chrome-symbols-dir=path"
print " the path to a Chrome symbols dir (can be absolute or relative"
print " to src), such as =out/Debug/lib"
- print " If not specified, will look for the newest lib in out/Debug or"
- print " out/Release"
+ print
+ print " --output-directory=path"
+ print " the path to the build output directory, such as out/Debug."
+ print " Ignored if --chrome-symbols-dir is passed."
print
print " --packed-relocation-adjustments"
print " --no-packed-relocation-adjustments"
@@ -139,6 +147,7 @@ def main(argv):
"less-info",
"chrome-symbols-dir=",
"chrome-apk-dir=",
+ "output-directory=",
"symbols-dir=",
"symbols-zip=",
"arch=",
@@ -164,6 +173,8 @@ def main(argv):
symbol.CHROME_SYMBOLS_DIR = os.path.join(symbol.CHROME_SRC, value)
elif option == "--chrome-apk-dir":
chrome_apk_dir = os.path.join(symbol.CHROME_SRC, value)
+ elif option == "--output-directory":
+ constants.SetOutputDirectory(value)
elif option == "--packed-relocation-adjustments":
packed_relocation_adjustments = True
elif option == "--no-packed-relocation-adjustments":
@@ -175,13 +186,19 @@ def main(argv):
elif option == "--verbose":
logging.basicConfig(level=logging.DEBUG)
- if symbol.CHROME_SYMBOLS_DIR and not chrome_apk_dir:
- chrome_apk_dir = os.path.join(symbol.CHROME_SYMBOLS_DIR,
- '..', DEFAULT_APK_DIR)
-
if len(arguments) > 1:
PrintUsage()
+ # Do an up-front test that the output directory is known.
+ if not symbol.CHROME_SYMBOLS_DIR:
+ constants.CheckOutDirectory()
+
+ if not chrome_apk_dir:
+ # TODO(agrieve): This directory doesn't exist with GN.
+ probable_dir = os.path.join(constants.GetOutDirectory(), DEFAULT_APK_DIR)
+ if os.path.exists(probable_dir):
+ chrome_apk_dir = probable_dir
+
if not arguments or arguments[0] == "-":
print "Reading native crash info from stdin"
f = sys.stdin
« build/android/tombstones.py ('K') | « third_party/android_platform/README.chromium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698