Merge "Moves merge scripts into a new merge folder."
This commit is contained in:
@@ -439,46 +439,6 @@ python_binary_host {
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
python_binary_host {
|
|
||||||
name: "merge_builds",
|
|
||||||
defaults: ["releasetools_binary_defaults"],
|
|
||||||
srcs: [
|
|
||||||
"merge_builds.py",
|
|
||||||
],
|
|
||||||
libs: [
|
|
||||||
"releasetools_build_super_image",
|
|
||||||
"releasetools_common",
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
|
||||||
python_binary_host {
|
|
||||||
name: "merge_target_files",
|
|
||||||
defaults: ["releasetools_binary_defaults"],
|
|
||||||
srcs: [
|
|
||||||
"merge_target_files.py",
|
|
||||||
],
|
|
||||||
libs: [
|
|
||||||
"releasetools_add_img_to_target_files",
|
|
||||||
"releasetools_build_super_image",
|
|
||||||
"releasetools_check_target_files_vintf",
|
|
||||||
"releasetools_common",
|
|
||||||
"releasetools_find_shareduid_violation",
|
|
||||||
"releasetools_img_from_target_files",
|
|
||||||
"releasetools_ota_from_target_files",
|
|
||||||
],
|
|
||||||
required: [
|
|
||||||
"checkvintf",
|
|
||||||
"host_init_verifier",
|
|
||||||
"secilc",
|
|
||||||
],
|
|
||||||
target: {
|
|
||||||
darwin: {
|
|
||||||
// libs dep "releasetools_ota_from_target_files" is disabled on darwin
|
|
||||||
enabled: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
python_binary_host {
|
python_binary_host {
|
||||||
name: "ota_from_target_files",
|
name: "ota_from_target_files",
|
||||||
defaults: [
|
defaults: [
|
||||||
@@ -597,11 +557,12 @@ python_defaults {
|
|||||||
"check_partition_sizes.py",
|
"check_partition_sizes.py",
|
||||||
"check_target_files_signatures.py",
|
"check_target_files_signatures.py",
|
||||||
"make_recovery_patch.py",
|
"make_recovery_patch.py",
|
||||||
"merge_target_files.py",
|
|
||||||
"ota_package_parser.py",
|
"ota_package_parser.py",
|
||||||
"sign_apex.py",
|
"sign_apex.py",
|
||||||
"sign_target_files_apks.py",
|
"sign_target_files_apks.py",
|
||||||
"validate_target_files.py",
|
"validate_target_files.py",
|
||||||
|
":releasetools_merge_sources",
|
||||||
|
":releasetools_merge_tests",
|
||||||
|
|
||||||
"test_*.py",
|
"test_*.py",
|
||||||
],
|
],
|
||||||
|
@@ -1,6 +1,3 @@
|
|||||||
elsk@google.com
|
elsk@google.com
|
||||||
nhdo@google.com
|
nhdo@google.com
|
||||||
zhangkelvin@google.com
|
zhangkelvin@google.com
|
||||||
|
|
||||||
per-file *merge_*.py = danielnorman@google.com, jgalmes@google.com, rseymour@google.com
|
|
||||||
|
|
||||||
|
69
tools/releasetools/merge/Android.bp
Normal file
69
tools/releasetools/merge/Android.bp
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
// Copyright (C) 2022 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.
|
||||||
|
|
||||||
|
package {
|
||||||
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
||||||
|
}
|
||||||
|
|
||||||
|
filegroup {
|
||||||
|
name: "releasetools_merge_sources",
|
||||||
|
srcs: [
|
||||||
|
"merge_target_files.py",
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
|
filegroup {
|
||||||
|
name: "releasetools_merge_tests",
|
||||||
|
srcs: [
|
||||||
|
"test_merge_target_files.py",
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
|
python_binary_host {
|
||||||
|
name: "merge_target_files",
|
||||||
|
defaults: ["releasetools_binary_defaults"],
|
||||||
|
srcs: [":releasetools_merge_sources"],
|
||||||
|
libs: [
|
||||||
|
"releasetools_add_img_to_target_files",
|
||||||
|
"releasetools_build_super_image",
|
||||||
|
"releasetools_check_target_files_vintf",
|
||||||
|
"releasetools_common",
|
||||||
|
"releasetools_find_shareduid_violation",
|
||||||
|
"releasetools_img_from_target_files",
|
||||||
|
"releasetools_ota_from_target_files",
|
||||||
|
],
|
||||||
|
required: [
|
||||||
|
"checkvintf",
|
||||||
|
"host_init_verifier",
|
||||||
|
"secilc",
|
||||||
|
],
|
||||||
|
target: {
|
||||||
|
darwin: {
|
||||||
|
// libs dep "releasetools_ota_from_target_files" is disabled on darwin
|
||||||
|
enabled: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
python_binary_host {
|
||||||
|
name: "merge_builds",
|
||||||
|
defaults: ["releasetools_binary_defaults"],
|
||||||
|
srcs: [
|
||||||
|
"merge_builds.py",
|
||||||
|
],
|
||||||
|
libs: [
|
||||||
|
"releasetools_build_super_image",
|
||||||
|
"releasetools_common",
|
||||||
|
],
|
||||||
|
}
|
3
tools/releasetools/merge/OWNERS
Normal file
3
tools/releasetools/merge/OWNERS
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
danielnorman@google.com
|
||||||
|
jgalmes@google.com
|
||||||
|
rseymour@google.com
|
@@ -33,6 +33,8 @@ import common
|
|||||||
# Some test runner doesn't like outputs from stderr.
|
# Some test runner doesn't like outputs from stderr.
|
||||||
logging.basicConfig(stream=sys.stdout)
|
logging.basicConfig(stream=sys.stdout)
|
||||||
|
|
||||||
|
ALLOWED_TEST_SUBDIRS = ('merge',)
|
||||||
|
|
||||||
# Use ANDROID_BUILD_TOP as an indicator to tell if the needed tools (e.g.
|
# Use ANDROID_BUILD_TOP as an indicator to tell if the needed tools (e.g.
|
||||||
# avbtool, mke2fs) are available while running the tests, unless
|
# avbtool, mke2fs) are available while running the tests, unless
|
||||||
# FORCE_RUN_RELEASETOOLS is set to '1'. Not having the required vars means we
|
# FORCE_RUN_RELEASETOOLS is set to '1'. Not having the required vars means we
|
||||||
@@ -244,9 +246,12 @@ if __name__ == '__main__':
|
|||||||
# os walk and load them manually.
|
# os walk and load them manually.
|
||||||
test_modules = []
|
test_modules = []
|
||||||
base_path = os.path.dirname(os.path.realpath(__file__))
|
base_path = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
test_dirs = [base_path] + [
|
||||||
|
os.path.join(base_path, subdir) for subdir in ALLOWED_TEST_SUBDIRS
|
||||||
|
]
|
||||||
for dirpath, _, files in os.walk(base_path):
|
for dirpath, _, files in os.walk(base_path):
|
||||||
for fn in files:
|
for fn in files:
|
||||||
if dirpath == base_path and re.match('test_.*\\.py$', fn):
|
if dirpath in test_dirs and re.match('test_.*\\.py$', fn):
|
||||||
test_modules.append(fn[:-3])
|
test_modules.append(fn[:-3])
|
||||||
|
|
||||||
test_suite = unittest.TestLoader().loadTestsFromNames(test_modules)
|
test_suite = unittest.TestLoader().loadTestsFromNames(test_modules)
|
||||||
|
Reference in New Issue
Block a user