| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import json | 6 import json |
| 7 import multiprocessing | 7 import multiprocessing |
| 8 import os | 8 import os |
| 9 import platform | 9 import platform |
| 10 import subprocess | 10 import subprocess |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 return {} | 59 return {} |
| 60 | 60 |
| 61 with common.temporary_file() as tempfile_path: | 61 with common.temporary_file() as tempfile_path: |
| 62 rc = common.run_command([ | 62 rc = common.run_command([ |
| 63 sys.executable, | 63 sys.executable, |
| 64 os.path.join(args.paths['checkout'], | 64 os.path.join(args.paths['checkout'], |
| 65 'build', | 65 'build', |
| 66 'android', | 66 'android', |
| 67 'buildbot', | 67 'buildbot', |
| 68 'bb_device_status_check.py'), | 68 'bb_device_status_check.py'), |
| 69 '--json-output', tempfile_path, | 69 '--json-output', tempfile_path]) |
| 70 '--blacklist-file', os.path.join( | |
| 71 args.paths['checkout'], 'out', 'bad_devices.json')]) | |
| 72 | 70 |
| 73 if rc: | 71 if rc: |
| 74 failures.append('bb_device_status_check') | 72 failures.append('bb_device_status_check') |
| 75 return {} | 73 return {} |
| 76 | 74 |
| 77 with open(tempfile_path, 'r') as src: | 75 with open(tempfile_path, 'r') as src: |
| 78 device_info = json.load(src) | 76 device_info = json.load(src) |
| 79 | 77 |
| 80 results = {} | 78 results = {} |
| 81 results['devices'] = sorted(v['serial'] for v in device_info) | 79 results['devices'] = sorted(v['serial'] for v in device_info) |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 def main_compile_targets(args): | 127 def main_compile_targets(args): |
| 130 json.dump([], args.output) | 128 json.dump([], args.output) |
| 131 | 129 |
| 132 | 130 |
| 133 if __name__ == '__main__': | 131 if __name__ == '__main__': |
| 134 funcs = { | 132 funcs = { |
| 135 'run': main_run, | 133 'run': main_run, |
| 136 'compile_targets': main_compile_targets, | 134 'compile_targets': main_compile_targets, |
| 137 } | 135 } |
| 138 sys.exit(common.run_script(sys.argv[1:], funcs)) | 136 sys.exit(common.run_script(sys.argv[1:], funcs)) |
| OLD | NEW |