platform_build/tools/releasetools/Android.bp
Tao Bao 93d52312d3 Merge "Build and use ota_from_target_files as a module."
am: b7957f112b

Change-Id: I2c2d6d17f0b52c83a591ebe28b31076741b3e967
2019-08-06 11:00:19 -07:00

207 lines
4.8 KiB
Text

// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
python_defaults {
name: "releasetools_library_defaults",
version: {
py2: {
enabled: true,
},
py3: {
enabled: true,
},
},
}
python_library_host {
name: "releasetools_common",
defaults: ["releasetools_library_defaults"],
srcs: [
"blockimgdiff.py",
"common.py",
"images.py",
"rangelib.py",
"sparse_img.py",
],
// Only the tools that are referenced directly are listed as required modules. For example,
// `avbtool` is not here, as the script always uses the one from info_dict['avb_avbtool'].
required: [
"aapt2",
"boot_signer",
"brotli",
"bsdiff",
"imgdiff",
"minigzip",
"mkbootfs",
],
}
python_library_host {
name: "releasetools_verity_utils",
defaults: ["releasetools_library_defaults"],
srcs: [
"verity_utils.py",
],
required: [
"append2simg",
"build_verity_metadata",
"build_verity_tree",
"fec",
],
}
python_defaults {
name: "releasetools_binary_defaults",
version: {
py2: {
enabled: true,
embedded_launcher: true,
},
py3: {
enabled: false,
embedded_launcher: false,
},
},
}
python_binary_host {
name: "build_image",
defaults: ["releasetools_binary_defaults"],
srcs: [
"build_image.py",
],
main: "build_image.py",
libs: [
"releasetools_common",
"releasetools_verity_utils",
],
required: [
"blk_alloc_to_base_fs",
"e2fsck",
"simg2img",
"tune2fs",
],
}
python_binary_host {
name: "build_super_image",
defaults: ["releasetools_binary_defaults"],
srcs: [
"build_super_image.py",
],
main: "build_super_image.py",
libs: [
"releasetools_common",
],
}
python_binary_host {
name: "merge_builds",
defaults: ["releasetools_binary_defaults"],
srcs: [
"build_super_image.py",
"merge_builds.py",
],
main: "merge_builds.py",
libs: [
"releasetools_common",
],
}
python_binary_host {
name: "ota_from_target_files",
defaults: ["releasetools_binary_defaults"],
srcs: [
"edify_generator.py",
"ota_from_target_files.py",
],
libs: [
"releasetools_common",
"releasetools_verity_utils",
],
required: [
"brillo_update_payload",
],
}
python_defaults {
name: "releasetools_test_defaults",
srcs: [
"add_img_to_target_files.py",
"apex_utils.py",
"build_image.py",
"build_super_image.py",
"check_ota_package_signature.py",
"check_target_files_signatures.py",
"edify_generator.py",
"img_from_target_files.py",
"make_recovery_patch.py",
"merge_target_files.py",
"ota_from_target_files.py",
"ota_package_parser.py",
"sign_apex.py",
"sign_target_files_apks.py",
"target_files_diff.py",
"validate_target_files.py",
"test_*.py",
],
libs: [
"releasetools_common",
"releasetools_verity_utils",
],
data: [
"testdata/*",
],
required: [
"otatools",
],
}
python_test_host {
name: "releasetools_test",
defaults: ["releasetools_test_defaults"],
main: "test_utils.py",
version: {
py2: {
enabled: true,
// When using embedded launcher, atest will try (but may fail) to load libc++.so from
// host, because the test executable won't be able to find the needed libs via its
// runpath.
embedded_launcher: false,
},
py3: {
enabled: false,
embedded_launcher: false,
},
},
test_suites: ["general-tests"],
}
python_test_host {
name: "releasetools_py3_test",
defaults: ["releasetools_test_defaults"],
main: "test_utils.py",
version: {
py2: {
enabled: false,
embedded_launcher: false,
},
py3: {
enabled: true,
embedded_launcher: false,
},
},
test_suites: ["general-tests"],
}