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

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

Issue 2339713003: merge run and check-rc steps (Closed)
Patch Set: always logcat -d 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_test.expected/Test-Android-Clang-AndroidOne-CPU-MT6582-arm-Release-GN_Android.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 9cb5b546d491a1ec067117e036609de23c2c079f..c3b934ea42046fb53f44602eeb5f1d10b4505d0b 100644
--- a/infra/bots/recipe_modules/flavor/gn_android_flavor.py
+++ b/infra/bots/recipe_modules/flavor/gn_android_flavor.py
@@ -37,7 +37,7 @@ class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils):
def _adb(self, title, *cmd, **kwargs):
self._ever_ran_adb = True
- # The only non-infra adb call (check rc) happens to not use _adb().
+ # The only non-infra adb steps (dm / nanobench) happen to not use _adb().
if 'infra_step' not in kwargs:
kwargs['infra_step'] = True
return self._run(title, 'adb', *cmd, **kwargs)
@@ -78,6 +78,7 @@ class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils):
def cleanup_steps(self):
if self._ever_ran_adb:
+ self._adb('dump log ', 'logcat', '-d')
borenet 2016/09/14 16:52:24 Nit: trailing space?
mtklein_C 2016/09/14 17:30:31 Done.
self._adb('reboot', 'reboot')
self._adb('kill adb server', 'kill-server')
@@ -94,15 +95,15 @@ class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils):
'push', self.m.vars.tmp_dir.join(sh), _bin_dir)
self._adb('clear log', 'logcat', '-c')
- self._adb(cmd[0], 'shell', 'sh', _bin_dir + sh)
- self._adb('dump log ', 'logcat', '-d')
-
- self.m.python.inline('check %s rc' % cmd[0], """
+ self.m.python.inline('%s' % cmd[0], """
import subprocess
import sys
+ bin_dir = sys.argv[1]
+ sh = sys.argv[2]
+ subprocess.check_call(['adb', 'shell', 'sh', bin_dir + sh])
sys.exit(int(subprocess.check_output(['adb', 'shell', 'cat',
- '%src'])))
- """ % _bin_dir)
+ bin_dir + 'rc'])))
borenet 2016/09/14 16:52:24 Please break this into a few lines and add a helpf
mtklein_C 2016/09/14 17:30:31 Done, mostly. We don't expect this 'adb shell ...
borenet 2016/09/14 17:44:35 Thanks. Mainly just want to distinguish between "t
+ """, args=[_bin_dir, sh])
def copy_file_to_device(self, host, device):
self._adb('push %s %s' % (host, device), 'push', host, device)
« no previous file with comments | « no previous file | infra/bots/recipes/swarm_test.expected/Test-Android-Clang-AndroidOne-CPU-MT6582-arm-Release-GN_Android.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698