| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Parses options for the instrumentation tests.""" | 5 """Parses options for the instrumentation tests.""" |
| 6 | 6 |
| 7 import constants | 7 import constants |
| 8 import optparse | 8 import optparse |
| 9 import os | 9 import os |
| 10 import sys | 10 import sys |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 option_parser.error('Options java_only (-j) and python_only (-p) ' | 119 option_parser.error('Options java_only (-j) and python_only (-p) ' |
| 120 'are mutually exclusive.') | 120 'are mutually exclusive.') |
| 121 | 121 |
| 122 options.run_java_tests = True | 122 options.run_java_tests = True |
| 123 options.run_python_tests = True | 123 options.run_python_tests = True |
| 124 if options.java_only: | 124 if options.java_only: |
| 125 options.run_python_tests = False | 125 options.run_python_tests = False |
| 126 elif options.python_only: | 126 elif options.python_only: |
| 127 options.run_java_tests = False | 127 options.run_java_tests = False |
| 128 | 128 |
| 129 # In case of SDK Build, the jars and apks have a -debug suffix. | |
| 130 options.test_apk_path = os.path.join(_SDK_OUT_DIR, | 129 options.test_apk_path = os.path.join(_SDK_OUT_DIR, |
| 131 options.build_type, | 130 options.build_type, |
| 132 constants.SDK_BUILD_APKS_DIR, | 131 constants.SDK_BUILD_APKS_DIR, |
| 133 '%s-debug.apk' % options.test_apk) | 132 '%s.apk' % options.test_apk) |
| 134 options.test_apk_jar_path = os.path.join(_SDK_OUT_DIR, | 133 options.test_apk_jar_path = os.path.join(_SDK_OUT_DIR, |
| 135 options.build_type, | 134 options.build_type, |
| 136 constants.SDK_BUILD_TEST_JAVALIB_DIR, | 135 constants.SDK_BUILD_TEST_JAVALIB_DIR, |
| 137 '%s-debug.jar' % options.test_apk) | 136 '%s.jar' % options.test_apk) |
| 138 if options.annotation_str: | 137 if options.annotation_str: |
| 139 options.annotation = options.annotation_str.split() | 138 options.annotation = options.annotation_str.split() |
| 140 elif options.test_filter: | 139 elif options.test_filter: |
| 141 options.annotation = [] | 140 options.annotation = [] |
| 142 else: | 141 else: |
| 143 options.annotation = ['Smoke', 'SmallTest', 'MediumTest', 'LargeTest'] | 142 options.annotation = ['Smoke', 'SmallTest', 'MediumTest', 'LargeTest'] |
| OLD | NEW |