| 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 """Defines a set of constants shared by test runners and other scripts.""" | 5 """Defines a set of constants shared by test runners and other scripts.""" |
| 6 # pylint: disable=W0212 | 6 # pylint: disable=W0212 |
| 7 | 7 |
| 8 import collections | 8 import collections |
| 9 import logging | 9 import logging |
| 10 import os | 10 import os |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 126 |
| 127 ADB_KEYS_FILE = '/data/misc/adb/adb_keys' | 127 ADB_KEYS_FILE = '/data/misc/adb/adb_keys' |
| 128 | 128 |
| 129 PERF_OUTPUT_DIR = os.path.join(DIR_SOURCE_ROOT, 'out', 'step_results') | 129 PERF_OUTPUT_DIR = os.path.join(DIR_SOURCE_ROOT, 'out', 'step_results') |
| 130 # The directory on the device where perf test output gets saved to. | 130 # The directory on the device where perf test output gets saved to. |
| 131 DEVICE_PERF_OUTPUT_DIR = ( | 131 DEVICE_PERF_OUTPUT_DIR = ( |
| 132 '/data/data/' + PACKAGE_INFO['chrome'].package + '/files') | 132 '/data/data/' + PACKAGE_INFO['chrome'].package + '/files') |
| 133 | 133 |
| 134 SCREENSHOTS_DIR = os.path.join(DIR_SOURCE_ROOT, 'out_screenshots') | 134 SCREENSHOTS_DIR = os.path.join(DIR_SOURCE_ROOT, 'out_screenshots') |
| 135 | 135 |
| 136 ANDROID_SDK_VERSION = 19 | 136 ANDROID_SDK_VERSION = 20 |
| 137 ANDROID_SDK_BUILD_TOOLS_VERSION = '19.0.0' | 137 ANDROID_SDK_BUILD_TOOLS_VERSION = '20.0.0' |
| 138 ANDROID_SDK_ROOT = os.path.join(DIR_SOURCE_ROOT, | 138 ANDROID_SDK_ROOT = os.path.join(DIR_SOURCE_ROOT, |
| 139 'third_party/android_tools/sdk') | 139 'third_party/android_tools/sdk') |
| 140 ANDROID_SDK_TOOLS = os.path.join(ANDROID_SDK_ROOT, | 140 ANDROID_SDK_TOOLS = os.path.join(ANDROID_SDK_ROOT, |
| 141 'build-tools', ANDROID_SDK_BUILD_TOOLS_VERSION) | 141 'build-tools', ANDROID_SDK_BUILD_TOOLS_VERSION) |
| 142 ANDROID_NDK_ROOT = os.path.join(DIR_SOURCE_ROOT, | 142 ANDROID_NDK_ROOT = os.path.join(DIR_SOURCE_ROOT, |
| 143 'third_party/android_tools/ndk') | 143 'third_party/android_tools/ndk') |
| 144 | 144 |
| 145 EMULATOR_SDK_ROOT = os.environ.get('ANDROID_EMULATOR_SDK_ROOT', | 145 EMULATOR_SDK_ROOT = os.environ.get('ANDROID_EMULATOR_SDK_ROOT', |
| 146 os.path.join(DIR_SOURCE_ROOT, | 146 os.path.join(DIR_SOURCE_ROOT, |
| 147 'android_emulator_sdk')) | 147 'android_emulator_sdk')) |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) | 198 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) |
| 199 return 'adb' | 199 return 'adb' |
| 200 except OSError: | 200 except OSError: |
| 201 logging.debug('No adb found in $PATH, fallback to checked in binary.') | 201 logging.debug('No adb found in $PATH, fallback to checked in binary.') |
| 202 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') | 202 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') |
| 203 | 203 |
| 204 | 204 |
| 205 # Exit codes | 205 # Exit codes |
| 206 ERROR_EXIT_CODE = 1 | 206 ERROR_EXIT_CODE = 1 |
| 207 WARNING_EXIT_CODE = 88 | 207 WARNING_EXIT_CODE = 88 |
| OLD | NEW |