Chromium Code Reviews| Index: build/android/test_runner.py |
| diff --git a/build/android/test_runner.py b/build/android/test_runner.py |
| index db6df24b321e062df5746893c698b76bf7cdbfeb..a41478cea5412617f6b1f71cab4ec3f59279ee60 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(args.output_directory, 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) |
|
jbudorick
2015/09/29 13:28:57
As written, the dynamic config takes precedence ov
|
| + 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): |