Index: build/android/adb_install_apk.py |
diff --git a/build/android/adb_install_apk.py b/build/android/adb_install_apk.py |
index fffcb567de0b5ee9d9cf3a9b0a0e9f5292a81c44..b5a0be16d420d083394a4cf9165a0354f880b1b7 100755 |
--- a/build/android/adb_install_apk.py |
+++ b/build/android/adb_install_apk.py |
@@ -15,12 +15,27 @@ from pylib import android_commands |
from pylib import constants |
from pylib.device import device_utils |
from pylib.utils import apk_helper |
-from pylib.utils import test_options_parser |
+ |
+ |
+def AddBuildTypeOption(option_parser): |
+ """Decorates OptionParser with build type option.""" |
+ default_build_type = 'Debug' |
bulach
2014/05/19 10:19:22
nit: 22-24 can be replaced with:
default_build_ty
mlamouri (slow - plz ping)
2014/05/19 13:15:38
Done. I actually moved the content to AddInstallAP
|
+ if 'BUILDTYPE' in os.environ: |
+ default_build_type = os.environ['BUILDTYPE'] |
+ option_parser.add_option('--debug', action='store_const', const='Debug', |
+ dest='build_type', default=default_build_type, |
+ help='If set, run test suites under out/Debug. ' |
+ 'Default is env var BUILDTYPE or Debug') |
+ option_parser.add_option('--release', action='store_const', const='Release', |
+ dest='build_type', |
+ help='If set, run test suites under out/Release. ' |
+ 'Default is env var BUILDTYPE or Debug.') |
def AddInstallAPKOption(option_parser): |
"""Adds apk option used to install the APK to the OptionParser.""" |
- test_options_parser.AddBuildTypeOption(option_parser) |
+ AddBuildTypeOption(option_parser) |
+ |
option_parser.add_option('--apk', |
help=('The name of the apk containing the ' |
' application (with the .apk extension).')) |