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

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

Issue 2486923002: Use devil's adb with each bisect iteration, also start/stop daemons. (Closed)
Patch Set: Rebase and address comments. Created 4 years, 1 month 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
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 3dc2fc01ff338c0a3fe6ba5a002514b624fcfa52..adc707730ef878f7e20eda3817e4c5878ea0408b 100644
--- a/scripts/slave/recipe_modules/chromium_android/api.py
+++ b/scripts/slave/recipe_modules/chromium_android/api.py
@@ -318,8 +318,10 @@ class AndroidApi(recipe_api.RecipeApi):
import sys
sys.path.append(sys.argv[1])
from devil import devil_env
+ from devil.android.sdk import adb_wrapper
devil_env.config.Initialize()
devil_env.config.PrefetchPaths(dependencies=['adb'])
+ adb_wrapper.AdbWrapper.StartServer()
""",
args=[devil_path])
self.m.adb.set_adb_path(
@@ -1161,6 +1163,40 @@ class AndroidApi(recipe_api.RecipeApi):
self.asan_device_teardown()
self.test_report()
+ def android_build_wrapper(self, logcat_gs_bucket='chromium-android'):
+ @contextlib.contextmanager
+ def wrapper(bisect_obj):
jbudorick 2016/11/09 23:51:46 nit: This shouldn't be "bisect_obj" if it's here.
jbudorick 2016/11/10 01:17:37 (and once ensure_checkout moves into bisect, this
ghost stip (do not use) 2016/11/11 01:08:17 Done.
+ """A context manager for use as auto_bisect's build_context_mgr.
+
+ This wraps every overall bisect run.
+ """
+ try:
+ bisect_obj.m.chromium_android.common_tests_setup_steps(
jbudorick 2016/11/09 23:51:45 When doing something like with android_build_wr
+ perf_setup=True, remove_system_webview=True)
+ bisect_obj.m.chromium.runhooks()
+
+ yield
+ finally:
+ bisect_obj.ensure_checkout()
jbudorick 2016/11/09 23:51:45 ...?
ghost stip (do not use) 2016/11/10 00:51:57 so we're in chromium_android. ensure_checkout is p
jbudorick 2016/11/10 01:00:29 Not following you here.
ghost stip (do not use) 2016/11/10 01:05:33 if we're okay with ensure_checkout coming after co
+ bisect_obj.m.chromium_android.common_tests_final_steps(
+ logcat_gs_bucket=logcat_gs_bucket)
+ return wrapper
+
+ def android_test_wrapper(self, logcat_gs_bucket='chromium-android'):
+ @contextlib.contextmanager
+ def wrapper(_bisect_obj):
jbudorick 2016/11/09 23:51:45 nit: same
+ """A context manager for running android test steps."""
+ try:
+ self.spawn_logcat_monitor()
+ self.spawn_device_monitor()
+
+ yield
+ finally:
+ self.shutdown_device_monitor()
+ self.logcat_dump(gs_bucket=logcat_gs_bucket)
+ self.stack_tool_steps()
+ return wrapper
+
def run_bisect_script(self, extra_src='', path_to_config='', **kwargs):
self.m.step('prepare bisect perf regression',
[self.m.path['checkout'].join('tools',

Powered by Google App Engine
This is Rietveld 408576698