| Index: build/android/pylib/test_options_parser.py
|
| diff --git a/build/android/pylib/test_options_parser.py b/build/android/pylib/test_options_parser.py
|
| index f8644fb8482712fa4211caaa4d2558cd00fe6d09..5f043a0db51047e0bd2cda39a73a4b52f9bcda42 100644
|
| --- a/build/android/pylib/test_options_parser.py
|
| +++ b/build/android/pylib/test_options_parser.py
|
| @@ -28,6 +28,7 @@ def AddBuildTypeOption(option_parser):
|
|
|
| def AddInstallAPKOption(option_parser):
|
| """Decorates OptionParser with apk option used to install the APK."""
|
| + AddBuildTypeOption(option_parser)
|
| option_parser.add_option('--apk',
|
| help=('The name of the apk containing the '
|
| ' application (with the .apk extension).'))
|
| @@ -35,6 +36,16 @@ def AddInstallAPKOption(option_parser):
|
| help=('The package name used by the apk containing '
|
| 'the application.'))
|
|
|
| +
|
| +def ValidateInstallAPKOption(option_parser, options):
|
| + if not options.apk:
|
| + option_parser.error('--apk is mandatory.')
|
| + if not os.path.exists(options.apk):
|
| + options.apk = os.path.join(os.environ['CHROME_SRC'],
|
| + 'out', options.build_type,
|
| + 'apks', options.apk)
|
| +
|
| +
|
| def AddTestRunnerOptions(option_parser, default_timeout=60):
|
| """Decorates OptionParser with options applicable to all tests."""
|
|
|
|
|