| 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..947e6aada433d671ebddeb46fd2f14fb8a830b0a 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,38 @@ 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(api):
|
| + """A context manager for use as auto_bisect's build_context_mgr.
|
| +
|
| + This wraps every overall bisect run.
|
| + """
|
| + try:
|
| + self.common_tests_setup_steps(
|
| + perf_setup=True, remove_system_webview=True)
|
| + api.chromium.runhooks()
|
| +
|
| + yield
|
| + finally:
|
| + self.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(_api):
|
| + """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',
|
|
|