| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 """A class to keep track of devices across builds and report state.""" | 7 """A class to keep track of devices across builds and report state.""" |
| 8 | 8 |
| 9 import optparse | 9 import optparse |
| 10 import os | 10 import os |
| 11 import sys | 11 import sys |
| 12 | 12 |
| 13 from android_commands import GetAttachedDevices | 13 from pylib.android_commands import GetAttachedDevices |
| 14 from cmd_helper import GetCmdOutput | 14 from pylib.cmd_helper import GetCmdOutput |
| 15 | 15 |
| 16 | 16 |
| 17 def DeviceInfo(serial): | 17 def DeviceInfo(serial): |
| 18 """Gathers info on a device via various adb calls. | 18 """Gathers info on a device via various adb calls. |
| 19 | 19 |
| 20 Args: | 20 Args: |
| 21 serial: The serial of the attached device to construct info about. | 21 serial: The serial of the attached device to construct info about. |
| 22 | 22 |
| 23 Returns: | 23 Returns: |
| 24 Tuple of device type, build id and report as a string. | 24 Tuple of device type, build id and report as a string. |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 unique_builds = list(set(builds)) | 111 unique_builds = list(set(builds)) |
| 112 | 112 |
| 113 print ('@@@BUILD_STEP Device Status Check - ' | 113 print ('@@@BUILD_STEP Device Status Check - ' |
| 114 '%d online devices, types %s, builds %s@@@' | 114 '%d online devices, types %s, builds %s@@@' |
| 115 % (len(devices), unique_types, unique_builds)) | 115 % (len(devices), unique_types, unique_builds)) |
| 116 print '\n'.join(reports) | 116 print '\n'.join(reports) |
| 117 CheckForMissingDevices(options, devices) | 117 CheckForMissingDevices(options, devices) |
| 118 | 118 |
| 119 if __name__ == '__main__': | 119 if __name__ == '__main__': |
| 120 sys.exit(main()) | 120 sys.exit(main()) |
| OLD | NEW |