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

Unified Diff: scripts/slave/recipes/bisection/android_bisect_staging.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/recipes/bisection/android_bisect_staging.py
diff --git a/scripts/slave/recipes/bisection/android_bisect_staging.py b/scripts/slave/recipes/bisection/android_bisect_staging.py
index 43f669ae4de16b9b9b2b0e2478d6079fed2a9752..5c90330e933db13533499b1577aeabd1780a7480 100644
--- a/scripts/slave/recipes/bisection/android_bisect_staging.py
+++ b/scripts/slave/recipes/bisection/android_bisect_staging.py
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import contextlib
+
from recipe_engine.types import freeze
DEPS = [
@@ -127,6 +129,21 @@ def RunSteps(api, mastername, buildername):
api.chromium_android.use_devil_adb()
+ @contextlib.contextmanager
+ def android_bisect_test_wrapper(bisect_obj):
+ """A context manager for use as auto_bisect's test_context_mgr.
+
+ This wraps each individual bisect test.
+ """
+ api.chromium_android.use_devil_adb()
+ with api.chromium_android.android_test_wrapper()(bisect_obj):
+ yield
+
+ # Make sure the bisect build and individual test runs are wrapped.
+ api.auto_bisect_staging.build_context_mgr = (
+ api.chromium_android.android_build_wrapper())
jbudorick 2016/11/10 01:00:29 For the build wrapper, you could do def androi
ghost stip (do not use) 2016/11/10 01:05:33 That would put ensure_checkout() after chromium_an
+ api.auto_bisect_staging.test_context_mgr = android_bisect_test_wrapper
+
api.auto_bisect_staging.start_try_job(api, update_step=update_step,
bot_db=bot_db,
do_not_nest_wait_for_revision=True)

Powered by Google App Engine
This is Rietveld 408576698