| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright 2013 The Chromium Authors. All rights reserved. | 3 # Copyright 2013 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 import logging | 8 import logging |
| 9 import optparse | 9 import optparse |
| 10 import os | 10 import os |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 'unimportant') | 334 'unimportant') |
| 335 for serial, battery in zip(devices, batteries): | 335 for serial, battery in zip(devices, batteries): |
| 336 perf_tests_results_helper.PrintPerfResult('DeviceBattery', serial, | 336 perf_tests_results_helper.PrintPerfResult('DeviceBattery', serial, |
| 337 [battery], '%', | 337 [battery], '%', |
| 338 'unimportant') | 338 'unimportant') |
| 339 | 339 |
| 340 if False in fail_step_lst: | 340 if False in fail_step_lst: |
| 341 # TODO(navabi): Build fails on device status check step if there exists any | 341 # TODO(navabi): Build fails on device status check step if there exists any |
| 342 # devices with critically low battery. Remove those devices from testing, | 342 # devices with critically low battery. Remove those devices from testing, |
| 343 # allowing build to continue with good devices. | 343 # allowing build to continue with good devices. |
| 344 return 1 | 344 return 2 |
| 345 | 345 |
| 346 if not devices: | 346 if not devices: |
| 347 return 1 | 347 return 1 |
| 348 | 348 |
| 349 | 349 |
| 350 if __name__ == '__main__': | 350 if __name__ == '__main__': |
| 351 sys.exit(main()) | 351 sys.exit(main()) |
| OLD | NEW |