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

Side by Side Diff: build/android/pylib/constants.py

Issue 164193010: android envsetup: Use gyp defines instead of env vars for sdk root and sdk tools. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sepvar Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/android/envsetup_functions.sh ('k') | build/common.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 6
7 import collections 7 import collections
8 import logging 8 import logging
9 import os 9 import os
10 import subprocess 10 import subprocess
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 SDK_BUILD_APKS_DIR = 'apks' 119 SDK_BUILD_APKS_DIR = 'apks'
120 120
121 PERF_OUTPUT_DIR = os.path.join(DIR_SOURCE_ROOT, 'out', 'step_results') 121 PERF_OUTPUT_DIR = os.path.join(DIR_SOURCE_ROOT, 'out', 'step_results')
122 # The directory on the device where perf test output gets saved to. 122 # The directory on the device where perf test output gets saved to.
123 DEVICE_PERF_OUTPUT_DIR = ( 123 DEVICE_PERF_OUTPUT_DIR = (
124 '/data/data/' + PACKAGE_INFO['chrome'].package + '/files') 124 '/data/data/' + PACKAGE_INFO['chrome'].package + '/files')
125 125
126 SCREENSHOTS_DIR = os.path.join(DIR_SOURCE_ROOT, 'out_screenshots') 126 SCREENSHOTS_DIR = os.path.join(DIR_SOURCE_ROOT, 'out_screenshots')
127 127
128 ANDROID_SDK_VERSION = 19 128 ANDROID_SDK_VERSION = 19
129 ANDROID_SDK_BUILD_TOOLS_VERSION = '19.0.0'
129 ANDROID_SDK_ROOT = os.path.join(DIR_SOURCE_ROOT, 130 ANDROID_SDK_ROOT = os.path.join(DIR_SOURCE_ROOT,
130 'third_party/android_tools/sdk') 131 'third_party/android_tools/sdk')
131 ANDROID_SDK_TOOLS = os.path.join(ANDROID_SDK_ROOT, 132 ANDROID_SDK_TOOLS = os.path.join(ANDROID_SDK_ROOT,
132 'build-tools/%d.0.0' % ANDROID_SDK_VERSION) 133 'build-tools', ANDROID_SDK_BUILD_TOOLS_VERSION)
133 ANDROID_NDK_ROOT = os.path.join(DIR_SOURCE_ROOT, 134 ANDROID_NDK_ROOT = os.path.join(DIR_SOURCE_ROOT,
134 'third_party/android_tools/ndk') 135 'third_party/android_tools/ndk')
135 136
136 EMULATOR_SDK_ROOT = os.environ.get('ANDROID_EMULATOR_SDK_ROOT', 137 EMULATOR_SDK_ROOT = os.environ.get('ANDROID_EMULATOR_SDK_ROOT',
137 os.path.join(DIR_SOURCE_ROOT, 138 os.path.join(DIR_SOURCE_ROOT,
138 'android_emulator_sdk')) 139 'android_emulator_sdk'))
139 140
140 UPSTREAM_FLAKINESS_SERVER = 'test-results.appspot.com' 141 UPSTREAM_FLAKINESS_SERVER = 'test-results.appspot.com'
141 142
142 143
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) 185 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull)
185 return 'adb' 186 return 'adb'
186 except OSError: 187 except OSError:
187 logging.debug('No adb found in $PATH, fallback to checked in binary.') 188 logging.debug('No adb found in $PATH, fallback to checked in binary.')
188 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') 189 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb')
189 190
190 191
191 # Exit codes 192 # Exit codes
192 ERROR_EXIT_CODE = 1 193 ERROR_EXIT_CODE = 1
193 WARNING_EXIT_CODE = 88 194 WARNING_EXIT_CODE = 88
OLDNEW
« no previous file with comments | « build/android/envsetup_functions.sh ('k') | build/common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698