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

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

Issue 775863004: Revert "[Android] Switch b/a/test_runner.py from optparse to argparse." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « build/android/pylib/base/test_run_factory.py ('k') | build/android/pylib/junit/setup.py » ('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 # 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 'gyp_py_unittests': { 195 'gyp_py_unittests': {
196 'path': os.path.join(DIR_SOURCE_ROOT, 'build', 'android', 'gyp'), 196 'path': os.path.join(DIR_SOURCE_ROOT, 'build', 'android', 'gyp'),
197 'test_modules': [ 197 'test_modules': [
198 'java_cpp_enum_tests', 198 'java_cpp_enum_tests',
199 ] 199 ]
200 }, 200 },
201 } 201 }
202 202
203 LOCAL_MACHINE_TESTS = ['junit', 'python'] 203 LOCAL_MACHINE_TESTS = ['junit', 'python']
204 VALID_ENVIRONMENTS = ['local'] 204 VALID_ENVIRONMENTS = ['local']
205 VALID_TEST_TYPES = ['gtest', 'instrumentation', 'junit', 'linker', 'monkey',
206 'perf', 'python', 'uiautomator']
207 205
208 206
209 def GetBuildType(): 207 def GetBuildType():
210 try: 208 try:
211 return os.environ['BUILDTYPE'] 209 return os.environ['BUILDTYPE']
212 except KeyError: 210 except KeyError:
213 raise Exception('The BUILDTYPE environment variable has not been set') 211 raise Exception('The BUILDTYPE environment variable has not been set')
214 212
215 213
216 def SetBuildType(build_type): 214 def SetBuildType(build_type):
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 with file(os.devnull, 'w') as devnull: 272 with file(os.devnull, 'w') as devnull:
275 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) 273 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull)
276 return 'adb' 274 return 'adb'
277 except OSError: 275 except OSError:
278 logging.debug('No adb found in $PATH, fallback to checked in binary.') 276 logging.debug('No adb found in $PATH, fallback to checked in binary.')
279 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') 277 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb')
280 278
281 # Exit codes 279 # Exit codes
282 ERROR_EXIT_CODE = 1 280 ERROR_EXIT_CODE = 1
283 WARNING_EXIT_CODE = 88 281 WARNING_EXIT_CODE = 88
OLDNEW
« no previous file with comments | « build/android/pylib/base/test_run_factory.py ('k') | build/android/pylib/junit/setup.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698