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

Unified Diff: infra/bots/recipe_modules/flavor/gn_android_flavor.py

Issue 2351243002: Snazzier dump log step on Android bots. (Closed)
Patch Set: Created 4 years, 3 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 | infra/bots/recipes/swarm_perf.expected/Perf-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-GN_Android_Vulkan.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/bots/recipe_modules/flavor/gn_android_flavor.py
diff --git a/infra/bots/recipe_modules/flavor/gn_android_flavor.py b/infra/bots/recipe_modules/flavor/gn_android_flavor.py
index b37c20641e375bf86ea24429291273b560c81192..a375f3cc4151e9b2fa04946f8a0bdb63d5e4cabf 100644
--- a/infra/bots/recipe_modules/flavor/gn_android_flavor.py
+++ b/infra/bots/recipe_modules/flavor/gn_android_flavor.py
@@ -79,7 +79,24 @@ class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils):
def cleanup_steps(self):
if self._ever_ran_adb:
- self._adb('dump log', 'logcat', '-d')
+ self.m.python.inline('dump log', """
+ import os
+ import subprocess
+ import sys
+ out = sys.argv[1]
+ log = subprocess.check_output(['adb', 'logcat', '-d'])
+ for line in log.split('\\n'):
+ tokens = line.split()
+ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':
+ addr, path = tokens[-2:]
+ local = os.path.join(out, os.path.basename(path))
+ if os.path.exists(local):
+ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])
+ line = line.replace(addr, addr + ' ' + sym.strip())
+ print line
+ """,
+ args=[self.m.vars.skia_out.join(self.m.vars.configuration)],
+ infra_step=True)
self._adb('reboot', 'reboot')
self._adb('kill adb server', 'kill-server')
« no previous file with comments | « no previous file | infra/bots/recipes/swarm_perf.expected/Perf-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-GN_Android_Vulkan.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698