# 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 import sys
from pylib import constants from pylib.constants import host_paths
if host_paths.DEVIL_PATH notin sys.path:
sys.path.insert(1, host_paths.DEVIL_PATH)
from devil import devil_env from devil.android.ndk import abis
_BUILD_DIR = os.path.join(constants.DIR_SOURCE_ROOT, 'build') if _BUILD_DIR notin sys.path:
sys.path.insert(1, _BUILD_DIR)
Args:
output_directory: An optional path to the output directory. Ifnot set,
no built dependencies are configured.
custom_deps: An optional dictionary specifying custom dependencies.
This should be of the form:
{ 'dependency_name': { 'platform': 'path',
...
},
...
}
adb_path: An optional path to use for the adb binary. Ifnot set, this uses
the adb binary provided by the Android SDK. """
build_with_chromium = _BuildWithChromium()
devil_dynamic_config = { 'config_type': 'BaseConfig', 'dependencies': {},
} if build_with_chromium and output_directory: # Non-chromium users of chromium's //build directory fetch build products # from google storage rather than use locally built copies. Chromium uses # locally-built copies so that changes to the tools can be easily tested.
_UseLocalBuildProducts(output_directory, devil_dynamic_config)
if custom_deps:
devil_dynamic_config['dependencies'].update(custom_deps) if adb_path:
devil_dynamic_config['dependencies'].update({ 'adb': { 'file_info': {
devil_env.GetPlatform(): { 'local_paths': [adb_path]
}
}
}
})
config_files = [_DEVIL_CONFIG] if build_with_chromium elseNone
devil_env.config.Initialize(configs=[devil_dynamic_config],
config_files=config_files)
Messung V0.5
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.