Index: build/android/test_runner.py |
diff --git a/build/android/test_runner.py b/build/android/test_runner.py |
index 16a2260b2ffec2308f27863fe2cc510ab2051e18..a804e63587be30567801d9a2875f916b144ef311 100755 |
--- a/build/android/test_runner.py |
+++ b/build/android/test_runner.py |
@@ -17,6 +17,7 @@ import threading |
import unittest |
from devil import base_error |
+from devil import devil_env |
from devil.android import apk_helper |
from devil.android import device_blacklist |
from devil.android import device_errors |
@@ -49,6 +50,10 @@ from pylib.uiautomator import setup as uiautomator_setup |
from pylib.uiautomator import test_options as uiautomator_test_options |
+_DEVIL_STATIC_CONFIG_FILE = os.path.abspath(os.path.join( |
+ constants.DIR_SOURCE_ROOT, 'build', 'android', 'devil_config.json')) |
+ |
+ |
def AddCommonOptions(parser): |
"""Adds all common options to |parser|.""" |
@@ -113,6 +118,22 @@ def ProcessCommonOptions(args): |
constants.SetOutputDirectory(args.output_directory) |
if args.adb_path: |
constants.SetAdbPath(args.adb_path) |
+ |
+ output_binary = lambda p: os.path.join(constants.GetOutDirectory(), p) |
+ devil_dynamic_deps = { |
+ 'md5sum_host': [output_binary('md5sum_bin_host')], |
+ 'md5sum_device': [output_binary('md5sum_dist')], |
+ 'forwarder_host': [output_binary('host_forwarder')], |
+ 'forwarder_device': [output_binary('forwarder_dist')], |
+ } |
+ if args.adb_path: |
+ devil_dynamic_deps['adb_path'] = [args.adb_path] |
+ |
+ devil_dynamic_config = devil_env.GenerateDynamicConfig(devil_dynamic_deps) |
+ devil_env.config.Initialize( |
+ configs=[devil_dynamic_config], |
+ config_files=[_DEVIL_STATIC_CONFIG_FILE]) |
+ |
# Some things such as Forwarder require ADB to be in the environment path. |
adb_dir = os.path.dirname(constants.GetAdbPath()) |
if adb_dir and adb_dir not in os.environ['PATH'].split(os.pathsep): |