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

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

Issue 52833002: Purge unpinned ashmem before parsing /proc/$pid/smaps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Digit and Tony's comments Created 7 years, 1 month 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
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 os 8 import os
9 import subprocess 9 import subprocess
10 import sys 10 import sys
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 ANDROID_SDK_ROOT = os.path.join(DIR_SOURCE_ROOT, 122 ANDROID_SDK_ROOT = os.path.join(DIR_SOURCE_ROOT,
123 'third_party/android_tools/sdk') 123 'third_party/android_tools/sdk')
124 ANDROID_NDK_ROOT = os.path.join(DIR_SOURCE_ROOT, 124 ANDROID_NDK_ROOT = os.path.join(DIR_SOURCE_ROOT,
125 'third_party/android_tools/ndk') 125 'third_party/android_tools/ndk')
126 126
127 EMULATOR_SDK_ROOT = os.path.join(DIR_SOURCE_ROOT, 'android_emulator_sdk') 127 EMULATOR_SDK_ROOT = os.path.join(DIR_SOURCE_ROOT, 'android_emulator_sdk')
128 128
129 UPSTREAM_FLAKINESS_SERVER = 'test-results.appspot.com' 129 UPSTREAM_FLAKINESS_SERVER = 'test-results.appspot.com'
130 130
131 131
132 def BuildTypeIsSet():
133 return 'BUILDTYPE' in os.environ
134
132 def GetBuildType(): 135 def GetBuildType():
133 try: 136 try:
134 return os.environ['BUILDTYPE'] 137 return os.environ['BUILDTYPE']
135 except KeyError: 138 except KeyError:
136 raise Exception('The BUILDTYPE environment variable has not been set') 139 raise Exception('The BUILDTYPE environment variable has not been set')
137 140
138 141
139 def SetBuildType(build_type): 142 def SetBuildType(build_type):
140 os.environ['BUILDTYPE'] = build_type 143 os.environ['BUILDTYPE'] = build_type
141 144
(...skipping 22 matching lines...) Expand all
164 except OSError: 167 except OSError:
165 print >> sys.stderr, 'No adb found in $PATH, fallback to checked in binary.' 168 print >> sys.stderr, 'No adb found in $PATH, fallback to checked in binary.'
166 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') 169 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb')
167 170
168 171
169 ADB_PATH = _GetADBPath() 172 ADB_PATH = _GetADBPath()
170 173
171 # Exit codes 174 # Exit codes
172 ERROR_EXIT_CODE = 1 175 ERROR_EXIT_CODE = 1
173 WARNING_EXIT_CODE = 88 176 WARNING_EXIT_CODE = 88
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698