| 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 collections | 7 import collections |
| 8 import logging | 8 import logging |
| 9 import os | 9 import os |
| 10 import subprocess | 10 import subprocess |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 None, | 54 None, |
| 55 None, | 55 None, |
| 56 None), | 56 None), |
| 57 'content_shell': PackageInfo( | 57 'content_shell': PackageInfo( |
| 58 'org.chromium.content_shell_apk', | 58 'org.chromium.content_shell_apk', |
| 59 'org.chromium.content_shell_apk.ContentShellActivity', | 59 'org.chromium.content_shell_apk.ContentShellActivity', |
| 60 '/data/local/tmp/content-shell-command-line', | 60 '/data/local/tmp/content-shell-command-line', |
| 61 None, | 61 None, |
| 62 'org.chromium.content_shell_apk.tests'), | 62 'org.chromium.content_shell_apk.tests'), |
| 63 'chromium_test_shell': PackageInfo( | 63 'chromium_test_shell': PackageInfo( |
| 64 'org.chromium.chrome.testshell', | 64 'org.chromium.chrome.shell', |
| 65 'org.chromium.chrome.testshell.ChromiumTestShellActivity', | 65 'org.chromium.chrome.shell.ChromiumTestShellActivity', |
| 66 '/data/local/tmp/chromium-testshell-command-line', | 66 '/data/local/tmp/chromium-testshell-command-line', |
| 67 'chromium_testshell_devtools_remote', | 67 'chromium_testshell_devtools_remote', |
| 68 'org.chromium.chrome.testshell.tests'), | 68 'org.chromium.chrome.shell.tests'), |
| 69 'android_webview_shell': PackageInfo( | 69 'android_webview_shell': PackageInfo( |
| 70 'org.chromium.android_webview.shell', | 70 'org.chromium.android_webview.shell', |
| 71 'org.chromium.android_webview.shell.AwShellActivity', | 71 'org.chromium.android_webview.shell.AwShellActivity', |
| 72 None, | 72 None, |
| 73 None, | 73 None, |
| 74 'org.chromium.android_webview.test'), | 74 'org.chromium.android_webview.test'), |
| 75 'gtest': PackageInfo( | 75 'gtest': PackageInfo( |
| 76 'org.chromium.native_test', | 76 'org.chromium.native_test', |
| 77 'org.chromium.native_test.ChromeNativeTestActivity', | 77 'org.chromium.native_test.ChromeNativeTestActivity', |
| 78 '/data/local/tmp/chrome-native-tests-command-line', | 78 '/data/local/tmp/chrome-native-tests-command-line', |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) | 185 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) |
| 186 return 'adb' | 186 return 'adb' |
| 187 except OSError: | 187 except OSError: |
| 188 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.') |
| 189 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') | 189 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') |
| 190 | 190 |
| 191 | 191 |
| 192 # Exit codes | 192 # Exit codes |
| 193 ERROR_EXIT_CODE = 1 | 193 ERROR_EXIT_CODE = 1 |
| 194 WARNING_EXIT_CODE = 88 | 194 WARNING_EXIT_CODE = 88 |
| OLD | NEW |