Chromium Code Reviews| Index: testing/scripts/host_info.py |
| diff --git a/testing/scripts/host_info.py b/testing/scripts/host_info.py |
| index b7da5ab2292fe8641c671d971aad543055cd7e7a..eb479216657138ed4c68eeccb0d6c05a4afea9d1 100755 |
| --- a/testing/scripts/host_info.py |
| +++ b/testing/scripts/host_info.py |
| @@ -10,10 +10,12 @@ import platform |
| import subprocess |
| import sys |
| - |
| import common |
| +INFRA_EXIT_CODE = 87 |
|
Paweł Hajdan Jr.
2016/07/04 10:38:08
Can we move that to testing/scripts/common? I'd al
rnephew (Reviews Here)
2016/07/06 15:37:09
Done.
|
| + |
| + |
| def is_linux(): |
| return sys.platform.startswith('linux') |
| @@ -61,16 +63,19 @@ def get_device_info(args, failures): |
| rc = common.run_command([ |
| sys.executable, |
| os.path.join(args.paths['checkout'], |
| - 'build', |
| + 'third_party', |
| + 'catapult', |
| + 'devil', |
| + 'devil', |
| 'android', |
| - 'buildbot', |
| - 'bb_device_status_check.py'), |
| + 'tools', |
| + 'device_status.py'), |
| '--json-output', tempfile_path, |
| '--blacklist-file', os.path.join( |
| args.paths['checkout'], 'out', 'bad_devices.json')]) |
| if rc: |
| - failures.append('bb_device_status_check') |
| + failures.append('device_status') |
| return {} |
| with open(tempfile_path, 'r') as src: |
| @@ -79,7 +84,8 @@ def get_device_info(args, failures): |
| results = {} |
| results['devices'] = sorted(v['serial'] for v in device_info) |
| - details = [v['build_detail'] for v in device_info if not v['blacklisted']] |
| + details = [ |
| + v['ro.build.fingerprint'] for v in device_info if not v['blacklisted']] |
| def unique_build_details(index): |
| return sorted(list(set([v.split(':')[index] for v in details]))) |
| @@ -126,7 +132,9 @@ def main_run(args): |
| '_host_info': host_info, |
| }, args.output) |
| - return len(failures) != 0 |
| + if len(failures) != 0: |
| + return INFRA_EXIT_CODE |
| + return 0 |
| def main_compile_targets(args): |