| OLD | NEW |
| 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 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 'md5sum_host': [ | 92 'md5sum_host': [ |
| 93 { | 93 { |
| 94 'platform': 'linux2', | 94 'platform': 'linux2', |
| 95 'arch': 'x86_64', | 95 'arch': 'x86_64', |
| 96 'name': 'md5sum_bin_host', | 96 'name': 'md5sum_bin_host', |
| 97 }, | 97 }, |
| 98 ], | 98 ], |
| 99 } | 99 } |
| 100 | 100 |
| 101 | 101 |
| 102 def Initialize(output_directory=None, custom_deps=None): | 102 def Initialize(output_directory=None, custom_deps=None, adb_path=None): |
| 103 """Initializes devil with chromium's binaries and third-party libraries. | 103 """Initializes devil with chromium's binaries and third-party libraries. |
| 104 | 104 |
| 105 This includes: | 105 This includes: |
| 106 - Libraries: | 106 - Libraries: |
| 107 - the android SDK ("android_sdk") | 107 - the android SDK ("android_sdk") |
| 108 - pymock ("pymock") | 108 - pymock ("pymock") |
| 109 - Build products: | 109 - Build products: |
| 110 - host & device forwarder binaries | 110 - host & device forwarder binaries |
| 111 ("forwarder_device" and "forwarder_host") | 111 ("forwarder_device" and "forwarder_host") |
| 112 - host & device md5sum binaries ("md5sum_device" and "md5sum_host") | 112 - host & device md5sum binaries ("md5sum_device" and "md5sum_host") |
| (...skipping 27 matching lines...) Expand all Loading... |
| 140 os.path.join(output_directory, dep_config['name']), | 140 os.path.join(output_directory, dep_config['name']), |
| 141 ], | 141 ], |
| 142 } | 142 } |
| 143 for dep_config in dep_configs | 143 for dep_config in dep_configs |
| 144 } | 144 } |
| 145 } | 145 } |
| 146 for dep_name, dep_configs in _DEVIL_BUILD_PRODUCT_DEPS.iteritems() | 146 for dep_name, dep_configs in _DEVIL_BUILD_PRODUCT_DEPS.iteritems() |
| 147 } | 147 } |
| 148 if custom_deps: | 148 if custom_deps: |
| 149 devil_dynamic_config['dependencies'].update(custom_deps) | 149 devil_dynamic_config['dependencies'].update(custom_deps) |
| 150 if adb_path: |
| 151 devil_dynamic_config['dependencies'].update({ |
| 152 'adb': { |
| 153 devil_env.GetPlatform(): [adb_path] |
| 154 } |
| 155 }) |
| 150 | 156 |
| 151 devil_env.config.Initialize( | 157 devil_env.config.Initialize( |
| 152 configs=[devil_dynamic_config], config_files=[_DEVIL_CONFIG]) | 158 configs=[devil_dynamic_config], config_files=[_DEVIL_CONFIG]) |
| 153 | 159 |
| OLD | NEW |