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')]) |
70 | 72 |
71 if rc: | 73 if rc: |
72 failures.append('bb_device_status_check') | 74 failures.append('bb_device_status_check') |
73 return {} | 75 return {} |
74 | 76 |
75 with open(tempfile_path, 'r') as src: | 77 with open(tempfile_path, 'r') as src: |
76 device_info = json.load(src) | 78 device_info = json.load(src) |
77 | 79 |
78 results = {} | 80 results = {} |
79 results['devices'] = sorted(v['serial'] for v in device_info) | 81 results['devices'] = sorted(v['serial'] for v in device_info) |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 def main_compile_targets(args): | 129 def main_compile_targets(args): |
128 json.dump([], args.output) | 130 json.dump([], args.output) |
129 | 131 |
130 | 132 |
131 if __name__ == '__main__': | 133 if __name__ == '__main__': |
132 funcs = { | 134 funcs = { |
133 'run': main_run, | 135 'run': main_run, |
134 'compile_targets': main_compile_targets, | 136 'compile_targets': main_compile_targets, |
135 } | 137 } |
136 sys.exit(common.run_script(sys.argv[1:], funcs)) | 138 sys.exit(common.run_script(sys.argv[1:], funcs)) |
OLD | NEW |