| Index: build/android/devil_chromium.py
|
| diff --git a/build/android/devil_chromium.py b/build/android/devil_chromium.py
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..10ccbf491f19de46d38f02965293009cf5702237
|
| --- /dev/null
|
| +++ b/build/android/devil_chromium.py
|
| @@ -0,0 +1,50 @@
|
| +# Copyright 2015 The Chromium Authors. All rights reserved.
|
| +# Use of this source code is governed by a BSD-style license that can be
|
| +# found in the LICENSE file.
|
| +
|
| +"""Configures devil for use in chromium."""
|
| +
|
| +import os
|
| +
|
| +from devil import devil_env
|
| +from pylib import constants
|
| +
|
| +
|
| +_DEVIL_CONFIG = os.path.abspath(os.path.dirname(__file__),
|
| + 'devil_chromium.json')
|
| +
|
| +
|
| +def Initialize(output_directory=None, custom_deps=None):
|
| + """Initializes devil with chromium's binaries and third-party libraries.
|
| +
|
| + This includes:
|
| + - the android SDK ("android_sdk")
|
| + - host & device forwarder binaries ("forwarder_device" and "forwarder_host")
|
| + - host & device md5sum binaries ("md5sum_device" and "md5sum_host"), and
|
| + - pymock ("pymock")
|
| +
|
| + Args:
|
| + output_directory: An optional path to the output directory. If not set,
|
| + defaults to out/<build type> (e.g., out/Debug)
|
| + custom_deps: An optional dictionary containing dependencies that should
|
| + be specified instead of or in addition
|
| + """
|
| +
|
| + if not output_directory:
|
| + output_directory = constants.GetOutDirectory()
|
| +
|
| + output_binary = lambda p: os.path.join(output_directory, p)
|
| + devil_dynamic_deps = {
|
| + 'forwarder_device': [output_binary('forwarder_dist')],
|
| + 'forwarder_host': [output_binary('host_forwarder')],
|
| + 'md5sum_device': [output_binary('md5sum_dist')],
|
| + 'md5sum_host': [output_binary('md5sum_bin_host')],
|
| + }
|
| +
|
| + if custom_deps:
|
| + devil_dynamic_deps.update(custom_deps)
|
| +
|
| + devil_dynamic_config = devil_env.GenerateDynamicConfig(devil_dynamic_deps)
|
| + devil_env.config.Initialize(configs=[devil_dynamic_config],
|
| + config_files=[_DEVIL_CONFIG])
|
| +
|
|
|