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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 'org.chromium.content_shell_apk.tests'), | 81 'org.chromium.content_shell_apk.tests'), |
82 'chrome_shell': PackageInfo( | 82 'chrome_shell': PackageInfo( |
83 'org.chromium.chrome.shell', | 83 'org.chromium.chrome.shell', |
84 'org.chromium.chrome.shell.ChromeShellActivity', | 84 'org.chromium.chrome.shell.ChromeShellActivity', |
85 '/data/local/tmp/chrome-shell-command-line', | 85 '/data/local/tmp/chrome-shell-command-line', |
86 'chrome_shell_devtools_remote', | 86 'chrome_shell_devtools_remote', |
87 'org.chromium.chrome.shell.tests'), | 87 'org.chromium.chrome.shell.tests'), |
88 'android_webview_shell': PackageInfo( | 88 'android_webview_shell': PackageInfo( |
89 'org.chromium.android_webview.shell', | 89 'org.chromium.android_webview.shell', |
90 'org.chromium.android_webview.shell.AwShellActivity', | 90 'org.chromium.android_webview.shell.AwShellActivity', |
91 None, | 91 '/data/local/tmp/android-webview-command-line', |
92 None, | 92 None, |
93 'org.chromium.android_webview.test'), | 93 'org.chromium.android_webview.test'), |
94 'gtest': PackageInfo( | 94 'gtest': PackageInfo( |
95 'org.chromium.native_test', | 95 'org.chromium.native_test', |
96 'org.chromium.native_test.ChromeNativeTestActivity', | 96 'org.chromium.native_test.ChromeNativeTestActivity', |
97 '/data/local/tmp/chrome-native-tests-command-line', | 97 '/data/local/tmp/chrome-native-tests-command-line', |
98 None, | 98 None, |
99 None), | 99 None), |
100 'content_browsertests': PackageInfo( | 100 'content_browsertests': PackageInfo( |
101 'org.chromium.content_browsertests_apk', | 101 'org.chromium.content_browsertests_apk', |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 with file(os.devnull, 'w') as devnull: | 275 with file(os.devnull, 'w') as devnull: |
276 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) | 276 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) |
277 return 'adb' | 277 return 'adb' |
278 except OSError: | 278 except OSError: |
279 logging.debug('No adb found in $PATH, fallback to checked in binary.') | 279 logging.debug('No adb found in $PATH, fallback to checked in binary.') |
280 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') | 280 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') |
281 | 281 |
282 # Exit codes | 282 # Exit codes |
283 ERROR_EXIT_CODE = 1 | 283 ERROR_EXIT_CODE = 1 |
284 WARNING_EXIT_CODE = 88 | 284 WARNING_EXIT_CODE = 88 |
OLD | NEW |