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 | 6 |
7 import os | 7 import os |
8 import subprocess | 8 import subprocess |
9 import sys | 9 import sys |
10 | 10 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 try: | 91 try: |
92 with file(os.devnull, 'w') as devnull: | 92 with file(os.devnull, 'w') as devnull: |
93 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) | 93 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) |
94 return 'adb' | 94 return 'adb' |
95 except OSError: | 95 except OSError: |
96 print >> sys.stderr, 'No adb found in $PATH, fallback to checked in binary.' | 96 print >> sys.stderr, 'No adb found in $PATH, fallback to checked in binary.' |
97 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') | 97 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') |
98 | 98 |
99 | 99 |
100 ADB_PATH = _GetADBPath() | 100 ADB_PATH = _GetADBPath() |
| 101 |
| 102 # Exit codes |
| 103 ERROR_EXIT_CODE = 1 |
| 104 WARNING_EXIT_CODE = 88 |
OLD | NEW |