| 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 }, | 191 }, |
| 192 # TODO(mkosiba) Enable after fixing these tests. | 192 # TODO(mkosiba) Enable after fixing these tests. |
| 193 # 'gyp_py_unittests': { | 193 # 'gyp_py_unittests': { |
| 194 # 'path': os.path.join(constants.DIR_SOURCE_ROOT, 'build', 'android', 'gyp'), | 194 # 'path': os.path.join(constants.DIR_SOURCE_ROOT, 'build', 'android', 'gyp'), |
| 195 # 'test_modules': [ | 195 # 'test_modules': [ |
| 196 # 'java_cpp_enum_tests' | 196 # 'java_cpp_enum_tests' |
| 197 # ] | 197 # ] |
| 198 # }, | 198 # }, |
| 199 } | 199 } |
| 200 | 200 |
| 201 LOCAL_MACHINE_TESTS = ['junit', 'python'] |
| 202 VALID_ENVIRONMENTS = ['local'] |
| 203 |
| 201 | 204 |
| 202 def GetBuildType(): | 205 def GetBuildType(): |
| 203 try: | 206 try: |
| 204 return os.environ['BUILDTYPE'] | 207 return os.environ['BUILDTYPE'] |
| 205 except KeyError: | 208 except KeyError: |
| 206 raise Exception('The BUILDTYPE environment variable has not been set') | 209 raise Exception('The BUILDTYPE environment variable has not been set') |
| 207 | 210 |
| 208 | 211 |
| 209 def SetBuildType(build_type): | 212 def SetBuildType(build_type): |
| 210 os.environ['BUILDTYPE'] = build_type | 213 os.environ['BUILDTYPE'] = build_type |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) | 250 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) |
| 248 return 'adb' | 251 return 'adb' |
| 249 except OSError: | 252 except OSError: |
| 250 logging.debug('No adb found in $PATH, fallback to checked in binary.') | 253 logging.debug('No adb found in $PATH, fallback to checked in binary.') |
| 251 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') | 254 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') |
| 252 | 255 |
| 253 | 256 |
| 254 # Exit codes | 257 # Exit codes |
| 255 ERROR_EXIT_CODE = 1 | 258 ERROR_EXIT_CODE = 1 |
| 256 WARNING_EXIT_CODE = 88 | 259 WARNING_EXIT_CODE = 88 |
| OLD | NEW |