Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(495)

Side by Side Diff: build/android/devil_chromium.py

Issue 1415413005: Revert of [Android] Add a configurable environment for devil/. (RELAND) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/android/devil_chromium.json ('k') | build/android/gyp/apk_install.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 """Configures devil for use in chromium."""
6
7 import os
8
9 from devil import devil_env
10
11
12 _DEVIL_CONFIG = os.path.abspath(
13 os.path.join(os.path.dirname(__file__), 'devil_chromium.json'))
14
15 _DEVIL_BUILD_PRODUCT_DEPS = {
16 'forwarder_device': {
17 'armeabi-v7a': 'forwarder_dist',
18 'arm64-v8a': 'forwarder_dist',
19 },
20 'forwarder_host': {
21 'any': 'host_forwarder',
22 },
23 'md5sum_device': {
24 'armeabi-v7a': 'md5sum_dist',
25 'arm64-v8a': 'md5sum_dist',
26 },
27 'md5sum_host': {
28 'any': 'md5sum_bin_host',
29 },
30 }
31
32
33 def Initialize(output_directory=None):
34 """Initializes devil with chromium's binaries and third-party libraries.
35
36 This includes:
37 - Libraries:
38 - the android SDK ("android_sdk")
39 - pymock ("pymock")
40 - Build products:
41 - host & device forwarder binaries
42 ("forwarder_device" and "forwarder_host")
43 - host & device md5sum binaries ("md5sum_device" and "md5sum_host")
44
45 Args:
46 output_directory: An optional path to the output directory. If not set,
47 no built dependencies are configured.
48 """
49
50 devil_dynamic_deps = {}
51
52 if output_directory:
53 for dep_name, arch_dict in _DEVIL_BUILD_PRODUCT_DEPS.iteritems():
54 devil_dynamic_deps[dep_name] = {}
55 for arch, name in arch_dict.iteritems():
56 devil_dynamic_deps[dep_name][arch] = os.path.join(
57 output_directory, name)
58
59 devil_dynamic_config = {
60 'config_type': 'BaseConfig',
61 'dependencies': {
62 dep_name: {
63 'file_info': {
64 'android_%s' % arch: {
65 'local_paths': [path]
66 }
67 for arch, path in arch_dict.iteritems()
68 }
69 }
70 for dep_name, arch_dict in devil_dynamic_deps.iteritems()
71 }
72 }
73
74 devil_env.config.Initialize(
75 configs=[devil_dynamic_config], config_files=[_DEVIL_CONFIG])
76
OLDNEW
« no previous file with comments | « build/android/devil_chromium.json ('k') | build/android/gyp/apk_install.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698