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

Unified Diff: scripts/slave/recipe_modules/chromium_android/api.py

Issue 2193843003: [Android] Fix failures not being logged on host_info step. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: [Android] Fix failures not being logged on host_info step. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | scripts/slave/recipes/android/perf.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_modules/chromium_android/api.py
diff --git a/scripts/slave/recipe_modules/chromium_android/api.py b/scripts/slave/recipe_modules/chromium_android/api.py
index 39fe915419d05d1e553c2157dd37352e656e41b2..b7c5c9ac41b76f69e19c5d1026d2b025c2c688a1 100644
--- a/scripts/slave/recipe_modules/chromium_android/api.py
+++ b/scripts/slave/recipe_modules/chromium_android/api.py
@@ -371,18 +371,19 @@ class AndroidApi(recipe_api.RecipeApi):
return self.device_status()
def host_info(self, args=[], **kwargs):
+ results = None
try:
with self.handle_exit_codes():
args.extend(['run', '--output', self.m.json.output()])
results = self.m.step(
- 'Host_Info',
+ 'Host Info',
[self.m.path['checkout'].join('testing', 'scripts',
'host_info.py')] + args,
env=self.m.chromium.get_env(),
infra_step=True,
step_test_data=lambda: self.m.json.test_api.output({
'valid': True,
- 'failures': ['Device 3208154b735c5117 blacklisted'],
+ 'failures': ['Failure A', 'Failure B'],
'_host_info': {
'os_system': 'os_system',
'os_release': 'os_release',
@@ -418,11 +419,13 @@ class AndroidApi(recipe_api.RecipeApi):
}]
}}),
**kwargs)
- if results.json.output.get('failures'):
- results.presentation.logs['Failures'] = results.json.output['failures']
return results
except self.m.step.InfraFailure:
pass
+ finally:
+ if results:
+ for failure in results.json.output.get('failures', []):
+ results.presentation.logs[failure] = [failure]
def device_recovery(self, restart_usb=False, **kwargs):
args = [
« 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