Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import contextlib | 5 import contextlib |
| 6 import datetime | 6 import datetime |
| 7 import json | 7 import json |
| 8 import os | 8 import os |
| 9 import re | 9 import re |
| 10 import sys | 10 import sys |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 413 "adb_status": "device", | 413 "adb_status": "device", |
| 414 "imei_slice": "", | 414 "imei_slice": "", |
| 415 "ro.build.product": "bullhead", | 415 "ro.build.product": "bullhead", |
| 416 "ro.build.id": "MDB08Q", | 416 "ro.build.id": "MDB08Q", |
| 417 "serial": "00d0d567893340f4", | 417 "serial": "00d0d567893340f4", |
| 418 "wifi_ip": "" | 418 "wifi_ip": "" |
| 419 }] | 419 }] |
| 420 }}), | 420 }}), |
| 421 **kwargs) | 421 **kwargs) |
| 422 return results | 422 return results |
| 423 except self.m.step.InfraFailure: | 423 except self.m.step.InfraFailure as f: |
| 424 pass | 424 for failure in f.result.json.output.get('failures', []): |
| 425 finally: | 425 f.result.presentation.logs[failure] = [failure] |
| 426 if results: | 426 f.result.presentation.status = self.m.step.FAILURE |
|
jbudorick
2016/08/01 23:29:21
Will this turn the step red rather than purple?
martiniss
2016/08/02 00:44:29
yes
rnephew (Reviews Here)
2016/08/02 01:03:49
c/p the wrong line. Fixed.
| |
| 427 for failure in results.json.output.get('failures', []): | |
| 428 results.presentation.logs[failure] = [failure] | |
| 429 | 427 |
| 430 def device_recovery(self, restart_usb=False, **kwargs): | 428 def device_recovery(self, restart_usb=False, **kwargs): |
| 431 args = [ | 429 args = [ |
| 432 '--blacklist-file', self.blacklist_file, | 430 '--blacklist-file', self.blacklist_file, |
| 433 '--known-devices-file', self.known_devices_file, | 431 '--known-devices-file', self.known_devices_file, |
| 434 '--adb-path', self.m.adb.adb_path(), | 432 '--adb-path', self.m.adb.adb_path(), |
| 435 '-v' | 433 '-v' |
| 436 ] | 434 ] |
| 437 self.m.step( | 435 self.m.step( |
| 438 'device_recovery', | 436 'device_recovery', |
| (...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1466 script = self.c.test_runner | 1464 script = self.c.test_runner |
| 1467 if wrapper_script_suite_name: | 1465 if wrapper_script_suite_name: |
| 1468 script = self.m.chromium.output_dir.join('bin', 'run_%s' % | 1466 script = self.m.chromium.output_dir.join('bin', 'run_%s' % |
| 1469 wrapper_script_suite_name) | 1467 wrapper_script_suite_name) |
| 1470 else: | 1468 else: |
| 1471 env = kwargs.get('env', {}) | 1469 env = kwargs.get('env', {}) |
| 1472 env['CHROMIUM_OUTPUT_DIR'] = env.get('CHROMIUM_OUTPUT_DIR', | 1470 env['CHROMIUM_OUTPUT_DIR'] = env.get('CHROMIUM_OUTPUT_DIR', |
| 1473 self.m.chromium.output_dir) | 1471 self.m.chromium.output_dir) |
| 1474 kwargs['env'] = env | 1472 kwargs['env'] = env |
| 1475 return self.m.python(step_name, script, args, **kwargs) | 1473 return self.m.python(step_name, script, args, **kwargs) |
| OLD | NEW |