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

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

Issue 2575003003: [Android] Use local build of chromium_commands.dex.jar in chromium tests. (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Configures devil for use in chromium.""" 5 """Configures devil for use in chromium."""
6 6
7 import os 7 import os
8 import sys 8 import sys
9 9
10 from pylib.constants import host_paths 10 from pylib.constants import host_paths
11 11
12 if host_paths.DEVIL_PATH not in sys.path: 12 if host_paths.DEVIL_PATH not in sys.path:
13 sys.path.append(host_paths.DEVIL_PATH) 13 sys.path.append(host_paths.DEVIL_PATH)
14 14
15 from devil import devil_env 15 from devil import devil_env
16 16
17 _DEVIL_CONFIG = os.path.abspath( 17 _DEVIL_CONFIG = os.path.abspath(
18 os.path.join(os.path.dirname(__file__), 'devil_chromium.json')) 18 os.path.join(os.path.dirname(__file__), 'devil_chromium.json'))
19 19
20 _DEVIL_BUILD_PRODUCT_DEPS = { 20 _DEVIL_BUILD_PRODUCT_DEPS = {
21 'chromium_commands': [
22 {
23 'platform': 'linux2',
24 'arch': 'x86_64',
25 'path_components': ['lib.java', 'chromium_commands.dex.jar'],
26 }
27 ],
21 'forwarder_device': [ 28 'forwarder_device': [
22 { 29 {
23 'platform': 'android', 30 'platform': 'android',
24 'arch': 'armeabi-v7a', 31 'arch': 'armeabi-v7a',
25 'name': 'forwarder_dist', 32 'path_components': ['forwarder_dist'],
26 }, 33 },
27 { 34 {
28 'platform': 'android', 35 'platform': 'android',
29 'arch': 'arm64-v8a', 36 'arch': 'arm64-v8a',
30 'name': 'forwarder_dist', 37 'path_components': ['forwarder_dist'],
31 }, 38 },
32 { 39 {
33 'platform': 'android', 40 'platform': 'android',
34 'arch': 'mips', 41 'arch': 'mips',
35 'name': 'forwarder_dist', 42 'path_components': ['forwarder_dist'],
36 }, 43 },
37 { 44 {
38 'platform': 'android', 45 'platform': 'android',
39 'arch': 'mips64', 46 'arch': 'mips64',
40 'name': 'forwarder_dist', 47 'path_components': ['forwarder_dist'],
41 }, 48 },
42 { 49 {
43 'platform': 'android', 50 'platform': 'android',
44 'arch': 'x86', 51 'arch': 'x86',
45 'name': 'forwarder_dist', 52 'path_components': ['forwarder_dist'],
46 }, 53 },
47 { 54 {
48 'platform': 'android', 55 'platform': 'android',
49 'arch': 'x86_64', 56 'arch': 'x86_64',
50 'name': 'forwarder_dist', 57 'path_components': ['forwarder_dist'],
51 }, 58 },
52 ], 59 ],
53 'forwarder_host': [ 60 'forwarder_host': [
54 { 61 {
55 'platform': 'linux2', 62 'platform': 'linux2',
56 'arch': 'x86_64', 63 'arch': 'x86_64',
57 'name': 'host_forwarder', 64 'path_components': ['host_forwarder'],
58 }, 65 },
59 ], 66 ],
60 'md5sum_device': [ 67 'md5sum_device': [
61 { 68 {
62 'platform': 'android', 69 'platform': 'android',
63 'arch': 'armeabi-v7a', 70 'arch': 'armeabi-v7a',
64 'name': 'md5sum_dist', 71 'path_components': ['md5sum_dist'],
65 }, 72 },
66 { 73 {
67 'platform': 'android', 74 'platform': 'android',
68 'arch': 'arm64-v8a', 75 'arch': 'arm64-v8a',
69 'name': 'md5sum_dist', 76 'path_components': ['md5sum_dist'],
70 }, 77 },
71 { 78 {
72 'platform': 'android', 79 'platform': 'android',
73 'arch': 'mips', 80 'arch': 'mips',
74 'name': 'md5sum_dist', 81 'path_components': ['md5sum_dist'],
75 }, 82 },
76 { 83 {
77 'platform': 'android', 84 'platform': 'android',
78 'arch': 'mips64', 85 'arch': 'mips64',
79 'name': 'md5sum_dist', 86 'path_components': ['md5sum_dist'],
80 }, 87 },
81 { 88 {
82 'platform': 'android', 89 'platform': 'android',
83 'arch': 'x86', 90 'arch': 'x86',
84 'name': 'md5sum_dist', 91 'path_components': ['md5sum_dist'],
85 }, 92 },
86 { 93 {
87 'platform': 'android', 94 'platform': 'android',
88 'arch': 'x86_64', 95 'arch': 'x86_64',
89 'name': 'md5sum_dist', 96 'path_components': ['md5sum_dist'],
90 }, 97 },
91 ], 98 ],
92 'md5sum_host': [ 99 'md5sum_host': [
93 { 100 {
94 'platform': 'linux2', 101 'platform': 'linux2',
95 'arch': 'x86_64', 102 'arch': 'x86_64',
96 'name': 'md5sum_bin_host', 103 'path_components': ['md5sum_bin_host'],
97 }, 104 },
98 ], 105 ],
99 } 106 }
100 107
101 108
102 def Initialize(output_directory=None, custom_deps=None, adb_path=None): 109 def Initialize(output_directory=None, custom_deps=None, adb_path=None):
103 """Initializes devil with chromium's binaries and third-party libraries. 110 """Initializes devil with chromium's binaries and third-party libraries.
104 111
105 This includes: 112 This includes:
106 - Libraries: 113 - Libraries:
(...skipping 23 matching lines...) Expand all
130 'config_type': 'BaseConfig', 137 'config_type': 'BaseConfig',
131 'dependencies': {}, 138 'dependencies': {},
132 } 139 }
133 if output_directory: 140 if output_directory:
134 output_directory = os.path.abspath(output_directory) 141 output_directory = os.path.abspath(output_directory)
135 devil_dynamic_config['dependencies'] = { 142 devil_dynamic_config['dependencies'] = {
136 dep_name: { 143 dep_name: {
137 'file_info': { 144 'file_info': {
138 '%s_%s' % (dep_config['platform'], dep_config['arch']): { 145 '%s_%s' % (dep_config['platform'], dep_config['arch']): {
139 'local_paths': [ 146 'local_paths': [
140 os.path.join(output_directory, dep_config['name']), 147 os.path.join(output_directory, *dep_config['path_components']),
141 ], 148 ],
142 } 149 }
143 for dep_config in dep_configs 150 for dep_config in dep_configs
144 } 151 }
145 } 152 }
146 for dep_name, dep_configs in _DEVIL_BUILD_PRODUCT_DEPS.iteritems() 153 for dep_name, dep_configs in _DEVIL_BUILD_PRODUCT_DEPS.iteritems()
147 } 154 }
148 if custom_deps: 155 if custom_deps:
149 devil_dynamic_config['dependencies'].update(custom_deps) 156 devil_dynamic_config['dependencies'].update(custom_deps)
150 if adb_path: 157 if adb_path:
151 devil_dynamic_config['dependencies'].update({ 158 devil_dynamic_config['dependencies'].update({
152 'adb': { 159 'adb': {
153 'file_info': { 160 'file_info': {
154 devil_env.GetPlatform(): { 161 devil_env.GetPlatform(): {
155 'local_paths': [adb_path] 162 'local_paths': [adb_path]
156 } 163 }
157 } 164 }
158 } 165 }
159 }) 166 })
160 167
161 devil_env.config.Initialize( 168 devil_env.config.Initialize(
162 configs=[devil_dynamic_config], config_files=[_DEVIL_CONFIG]) 169 configs=[devil_dynamic_config], config_files=[_DEVIL_CONFIG])
163 170
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698