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

Unified Diff: build/android/adb_install_apk.py

Issue 292653003: Move AddBuildTypeOption to adb_install_apk.py and remove test_options_parser.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: style fix Created 6 years, 7 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
« no previous file with comments | « no previous file | build/android/pylib/utils/test_options_parser.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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).'))
« no previous file with comments | « no previous file | build/android/pylib/utils/test_options_parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698