Index: build/android/devil_chromium.py |
diff --git a/build/android/devil_chromium.py b/build/android/devil_chromium.py |
index 35e83ed5d3c4fa76a2aa320758df5096a3cd52e7..8472f659bdcfd1881f9bbff155f524236cbeec8d 100644 |
--- a/build/android/devil_chromium.py |
+++ b/build/android/devil_chromium.py |
@@ -4,7 +4,6 @@ |
"""Configures devil for use in chromium.""" |
-import logging |
import os |
import sys |
@@ -14,6 +13,90 @@ |
sys.path.append(host_paths.DEVIL_PATH) |
from devil import devil_env |
+ |
+_DEVIL_CONFIG = os.path.abspath( |
+ os.path.join(os.path.dirname(__file__), 'devil_chromium.json')) |
+ |
+_DEVIL_BUILD_PRODUCT_DEPS = { |
+ 'forwarder_device': [ |
+ { |
+ 'platform': 'android', |
+ 'arch': 'armeabi-v7a', |
+ 'name': 'forwarder_dist', |
+ }, |
+ { |
+ 'platform': 'android', |
+ 'arch': 'arm64-v8a', |
+ 'name': 'forwarder_dist', |
+ }, |
+ { |
+ 'platform': 'android', |
+ 'arch': 'mips', |
+ 'name': 'forwarder_dist', |
+ }, |
+ { |
+ 'platform': 'android', |
+ 'arch': 'mips64', |
+ 'name': 'forwarder_dist', |
+ }, |
+ { |
+ 'platform': 'android', |
+ 'arch': 'x86', |
+ 'name': 'forwarder_dist', |
+ }, |
+ { |
+ 'platform': 'android', |
+ 'arch': 'x86_64', |
+ 'name': 'forwarder_dist', |
+ }, |
+ ], |
+ 'forwarder_host': [ |
+ { |
+ 'platform': 'linux2', |
+ 'arch': 'x86_64', |
+ 'name': 'host_forwarder', |
+ }, |
+ ], |
+ 'md5sum_device': [ |
+ { |
+ 'platform': 'android', |
+ 'arch': 'armeabi-v7a', |
+ 'name': 'md5sum_dist', |
+ }, |
+ { |
+ 'platform': 'android', |
+ 'arch': 'arm64-v8a', |
+ 'name': 'md5sum_dist', |
+ }, |
+ { |
+ 'platform': 'android', |
+ 'arch': 'mips', |
+ 'name': 'md5sum_dist', |
+ }, |
+ { |
+ 'platform': 'android', |
+ 'arch': 'mips64', |
+ 'name': 'md5sum_dist', |
+ }, |
+ { |
+ 'platform': 'android', |
+ 'arch': 'x86', |
+ 'name': 'md5sum_dist', |
+ }, |
+ { |
+ 'platform': 'android', |
+ 'arch': 'x86_64', |
+ 'name': 'md5sum_dist', |
+ }, |
+ ], |
+ 'md5sum_host': [ |
+ { |
+ 'platform': 'linux2', |
+ 'arch': 'x86_64', |
+ 'name': 'md5sum_bin_host', |
+ }, |
+ ], |
+} |
def Initialize(output_directory=None, custom_deps=None): |
@@ -42,23 +125,29 @@ |
... |
} |
""" |
- config_files = None |
- if output_directory: |
- generated_config_file = os.path.abspath(os.path.join( |
- output_directory, 'gen', 'devil_chromium.json')) |
- if os.path.exists(generated_config_file): |
- config_files = [generated_config_file] |
- else: |
- logging.warning('%s not found in output directory.', |
- generated_config_file) |
- custom_config = { |
+ devil_dynamic_config = { |
'config_type': 'BaseConfig', |
'dependencies': {}, |
} |
+ if output_directory: |
+ output_directory = os.path.abspath(output_directory) |
+ devil_dynamic_config['dependencies'] = { |
+ dep_name: { |
+ 'file_info': { |
+ '%s_%s' % (dep_config['platform'], dep_config['arch']): { |
+ 'local_paths': [ |
+ os.path.join(output_directory, dep_config['name']), |
+ ], |
+ } |
+ for dep_config in dep_configs |
+ } |
+ } |
+ for dep_name, dep_configs in _DEVIL_BUILD_PRODUCT_DEPS.iteritems() |
+ } |
if custom_deps: |
- custom_config['dependencies'].update(custom_deps) |
+ devil_dynamic_config['dependencies'].update(custom_deps) |
devil_env.config.Initialize( |
- configs=[custom_config], config_files=config_files) |
+ configs=[devil_dynamic_config], config_files=[_DEVIL_CONFIG]) |