OLD | NEW |
| (Empty) |
1 #!/usr/bin/env python | |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
3 # Use of this source code is governed by a BSD-style license that can be | |
4 # found in the LICENSE file. | |
5 | |
6 """ Verify that the Android device is attached and functioning properly """ | |
7 | |
8 | |
9 import os | |
10 import sys | |
11 | |
12 BUILDBOT_PATH = os.path.realpath(os.path.join( | |
13 os.path.dirname(os.path.abspath(__file__)), | |
14 os.pardir, os.pardir)) | |
15 sys.path.append(BUILDBOT_PATH) | |
16 CHROMIUM_BUILDBOT = os.path.join(BUILDBOT_PATH, 'third_party', | |
17 'chromium_buildbot') | |
18 sys.path.append(os.path.join(CHROMIUM_BUILDBOT, 'scripts')) | |
19 sys.path.append(os.path.join(BUILDBOT_PATH, 'common')) | |
20 | |
21 from py.utils import android_utils, misc | |
22 | |
23 | |
24 class AndroidVerifyDevice: | |
25 | |
26 # pylint: disable=R0201 | |
27 def _Run(self): | |
28 args = misc.ArgsToDict(sys.argv) | |
29 serial = args['serial'] | |
30 android_utils.ADBShell(serial, ['cat', '/system/build.prop'], echo=False) | |
31 print 'Device %s is attached and seems to be working properly.' % serial | |
32 | |
33 | |
34 if '__main__' == __name__: | |
35 # pylint: disable=W0212 | |
36 sys.exit(AndroidVerifyDevice()._Run()) | |
OLD | NEW |