Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: scripts/slave/recipe_modules/chromium_android/api.py

Issue 2204643002: [Android] Add failures to results log line for Host Info step. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: [Android] Add failures to results log line for Host Info step. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | scripts/slave/recipes/android/perf.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 with self.handle_exit_codes(): 376 with self.handle_exit_codes():
377 args.extend(['run', '--output', self.m.json.output()]) 377 args.extend(['run', '--output', self.m.json.output()])
378 results = self.m.step( 378 results = self.m.step(
379 'Host Info', 379 'Host Info',
380 [self.m.path['checkout'].join('testing', 'scripts', 380 [self.m.path['checkout'].join('testing', 'scripts',
381 'host_info.py')] + args, 381 'host_info.py')] + args,
382 env=self.m.chromium.get_env(), 382 env=self.m.chromium.get_env(),
383 infra_step=True, 383 infra_step=True,
384 step_test_data=lambda: self.m.json.test_api.output({ 384 step_test_data=lambda: self.m.json.test_api.output({
385 'valid': True, 385 'valid': True,
386 'failures': ['Failure A', 'Failure B'], 386 'failures': [],
387 '_host_info': { 387 '_host_info': {
388 'os_system': 'os_system', 388 'os_system': 'os_system',
389 'os_release': 'os_release', 389 'os_release': 'os_release',
390 'processor': 'processor', 390 'processor': 'processor',
391 'num_cpus': 'num_cpus', 391 'num_cpus': 'num_cpus',
392 'free_disk_space': 'free_disk_space', 392 'free_disk_space': 'free_disk_space',
393 'python_version': 'python_version', 393 'python_version': 'python_version',
394 'python_path': 'python_path', 394 'python_path': 'python_path',
395 'devices': [{ 395 'devices': [{
396 "usb_status": True, 396 "usb_status": True,
(...skipping 16 matching lines...) Expand all
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.EXCEPTION
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
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)
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipes/android/perf.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698