Merge "Fix echo when copying package-res.apk"
diff --git a/core/Makefile b/core/Makefile
index 61ed94d..9481e26 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -2493,10 +2493,6 @@
endif
ifeq ($(AB_OTA_UPDATER),true)
- ifdef BRILLO_VENDOR_PARTITIONS
- $(BUILT_TARGET_FILES_PACKAGE): $(foreach p,$(BRILLO_VENDOR_PARTITIONS),\
- $(call word-colon,1,$(p))/$(call word-colon,2,$(p)))
- endif
ifdef OSRELEASED_DIRECTORY
$(BUILT_TARGET_FILES_PACKAGE): $(TARGET_OUT_OEM)/$(OSRELEASED_DIRECTORY)/product_id
$(BUILT_TARGET_FILES_PACKAGE): $(TARGET_OUT_OEM)/$(OSRELEASED_DIRECTORY)/product_version
@@ -2739,17 +2735,6 @@
@# Include the build type in META/misc_info.txt so the server can easily differentiate production builds.
$(hide) echo "build_type=$(TARGET_BUILD_VARIANT)" >> $(zip_root)/META/misc_info.txt
$(hide) echo "ab_update=true" >> $(zip_root)/META/misc_info.txt
-ifdef BRILLO_VENDOR_PARTITIONS
- $(hide) mkdir -p $(zip_root)/VENDOR_IMAGES
- $(hide) for f in $(BRILLO_VENDOR_PARTITIONS); do \
- pair1="$$(echo $$f | awk -F':' '{print $$1}')"; \
- pair2="$$(echo $$f | awk -F':' '{print $$2}')"; \
- src=$${pair1}/$${pair2}; \
- dest=$(zip_root)/VENDOR_IMAGES/$${pair2}; \
- mkdir -p $$(dirname "$${dest}"); \
- cp $${src} $${dest}; \
- done;
-endif
ifdef OSRELEASED_DIRECTORY
$(hide) cp $(TARGET_OUT_OEM)/$(OSRELEASED_DIRECTORY)/product_id $(zip_root)/META/product_id.txt
$(hide) cp $(TARGET_OUT_OEM)/$(OSRELEASED_DIRECTORY)/product_version $(zip_root)/META/product_version.txt
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 94c323e..f1ba90b 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -646,6 +646,13 @@
endif # LOCAL_COMPATIBILITY_SUITE
###########################################################
+## Add test module to ALL_DISABLED_PRESUBMIT_TESTS if LOCAL_PRESUBMIT_DISABLED is set to true.
+###########################################################
+ifeq ($(LOCAL_PRESUBMIT_DISABLED),true)
+ ALL_DISABLED_PRESUBMIT_TESTS += $(LOCAL_MODULE)
+endif # LOCAL_PRESUBMIT_DISABLED
+
+###########################################################
## Register with ALL_MODULES
###########################################################
diff --git a/core/binary.mk b/core/binary.mk
index a5f46da..39f1161 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -547,7 +547,11 @@
my_host_global_cflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CFLAGS)
my_host_global_conlyflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CONLYFLAGS) $(my_c_std_conlyflags)
my_host_global_cppflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CPPFLAGS) $(my_cpp_std_cppflags)
-my_host_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_LDFLAGS)
+ifeq ($(my_use_clang_lld),true)
+ my_host_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_LLDFLAGS)
+else
+ my_host_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_LDFLAGS)
+endif # my_use_clang_lld
else
my_host_global_cflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)GLOBAL_CFLAGS)
my_host_global_conlyflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)GLOBAL_CONLYFLAGS) $(my_c_std_conlyflags)
diff --git a/core/build_id.mk b/core/build_id.mk
index ff4d013..05113ca 100644
--- a/core/build_id.mk
+++ b/core/build_id.mk
@@ -18,4 +18,4 @@
# (like "CRB01"). It must be a single word, and is
# capitalized by convention.
-export BUILD_ID=OC-MR1
+BUILD_ID=OC-MR1
diff --git a/core/clear_vars.mk b/core/clear_vars.mk
index 62549d9..5f3cfdf 100644
--- a/core/clear_vars.mk
+++ b/core/clear_vars.mk
@@ -196,6 +196,7 @@
LOCAL_PREBUILT_OBJ_FILES:=
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES:=
LOCAL_PREBUILT_STRIP_COMMENTS:=
+LOCAL_PRESUBMIT_DISABLED:=
LOCAL_PRIVATE_PLATFORM_APIS:=
LOCAL_PRIVILEGED_MODULE:=
# '',full,custom,disabled,obfuscation,optimization
diff --git a/core/config.mk b/core/config.mk
index 7a42552..c432c37 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -960,12 +960,19 @@
endif
# Resolve LOCAL_SDK_VERSION to prebuilt module name, e.g.:
-# 23 -> sdk_v23
-# system_current -> sdk_vsystem_current
-# Note: this also replaces core_X with X (to be removed as there are prebuilts for core now).
+# 23 -> sdk_public_23_android
+# system_current -> sdk_system_current_android
# $(1): An sdk version (LOCAL_SDK_VERSION)
define resolve-prebuilt-sdk-module
- sdk_v$(patsubst core_%,%,$(1))
+$(if $(findstring _,$(1)),\
+ sdk_$(1)_android,\
+ sdk_public_$(1)_android)
+endef
+
+# Resolve LOCAL_SDK_VERSION to prebuilt framework.aidl
+# $(1): An sdk version (LOCAL_SDK_VERSION)
+define resolve-prebuilt-aidl-path
+$(HISTORICAL_SDK_VERSIONS_ROOT)/$(subst core_,,$(subst system_,,$(subst test_,,$(1))))/public/framework.aidl
endef
# Historical SDK version N is stored in $(HISTORICAL_SDK_VERSIONS_ROOT)/N.
@@ -984,17 +991,16 @@
( sgrax $(1) | sort -g ) )
endef
-TARGET_AVAILABLE_SDK_VERSIONS := $(call numerically_sort,\
- $(patsubst $(HISTORICAL_SDK_VERSIONS_ROOT)/%/android.jar,%, \
- $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/android.jar)))
-
-TARGET_AVAILABLE_SDK_VERSIONS := $(addprefix system_,$(call numerically_sort,\
- $(patsubst $(HISTORICAL_SDK_VERSIONS_ROOT)/%/android_system.jar,%, \
- $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/android_system.jar)))) \
- $(TARGET_AVAILABLE_SDK_VERSIONS)
-
-# We don't have prebuilt test_current and core_current SDK yet.
-TARGET_AVAILABLE_SDK_VERSIONS := test_current core_current $(TARGET_AVAILABLE_SDK_VERSIONS)
+# This produces a list like "current/core current/public current/system 4/public"
+TARGET_AVAILABLE_SDK_VERSIONS := $(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/*/android.jar)
+TARGET_AVAILABLE_SDK_VERSIONS := $(patsubst $(HISTORICAL_SDK_VERSIONS_ROOT)/%/android.jar,%,$(TARGET_AVAILABLE_SDK_VERSIONS))
+# Strips and reorganizes the "public", "core" and "system" subdirs.
+TARGET_AVAILABLE_SDK_VERSIONS := $(subst /public,,$(TARGET_AVAILABLE_SDK_VERSIONS))
+TARGET_AVAILABLE_SDK_VERSIONS := $(patsubst %/core,core_%,$(TARGET_AVAILABLE_SDK_VERSIONS))
+TARGET_AVAILABLE_SDK_VERSIONS := $(patsubst %/system,system_%,$(TARGET_AVAILABLE_SDK_VERSIONS))
+# No prebuilt for test_current.
+TARGET_AVAILABLE_SDK_VERSIONS += test_current
+TARGET_AVAIALBLE_SDK_VERSIONS := $(call numerically_sort,$(TARGET_AVAILABLE_SDK_VERSIONS))
TARGET_SDK_VERSIONS_WITHOUT_JAVA_18_SUPPORT := $(call numbers_less_than,24,$(TARGET_AVAILABLE_SDK_VERSIONS))
TARGET_SDK_VERSIONS_WITHOUT_JAVA_19_SUPPORT := $(call numbers_less_than,27,$(TARGET_AVAILABLE_SDK_VERSIONS))
diff --git a/core/definitions.mk b/core/definitions.mk
index fe96688..6f029e9 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -102,6 +102,9 @@
# All installed vintf manifest fragments for a partition at
ALL_VINTF_MANIFEST_FRAGMENTS_LIST:=
+# All tests that should be skipped in presubmit check.
+ALL_DISABLED_PRESUBMIT_TESTS :=
+
###########################################################
## Debugging; prints a variable list to stdout
###########################################################
diff --git a/core/java.mk b/core/java.mk
index dab5314..94b7bcb 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -120,7 +120,7 @@
# LOCAL_SDK_VERSION is current and no TARGET_BUILD_APPS
aidl_preprocess_import := $(TARGET_OUT_COMMON_INTERMEDIATES)/framework.aidl
else
- aidl_preprocess_import := $(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_VERSION)/framework.aidl
+ aidl_preprocess_import := $(call resolve-prebuilt-aidl-path,$(LOCAL_SDK_VERSION))
endif # not current or system_current
else
# build against the platform.
@@ -404,6 +404,7 @@
$(error invalid value for LOCAL_PROGUARD_ENABLED: $(LOCAL_PROGUARD_ENABLED))
endif
proguard_dictionary := $(intermediates.COMMON)/proguard_dictionary
+proguard_configuration := $(intermediates.COMMON)/proguard_configuration
# When an app contains references to APIs that are not in the SDK specified by
# its LOCAL_SDK_VERSION for example added by support library or by runtime
@@ -434,6 +435,7 @@
$(filter-out $(my_proguard_sdk_raise),$(full_shared_java_header_libs))
legacy_proguard_flags += -printmapping $(proguard_dictionary)
+legacy_proguard_flags += -printconfiguration $(proguard_configuration)
common_proguard_flags := -forceprocessing
@@ -516,9 +518,9 @@
ifneq ($(filter obfuscation,$(LOCAL_PROGUARD_ENABLED)),)
ifneq ($(LOCAL_USE_R8),true)
- $(full_classes_proguard_jar): .KATI_IMPLICIT_OUTPUTS := $(proguard_dictionary)
+ $(full_classes_proguard_jar): .KATI_IMPLICIT_OUTPUTS := $(proguard_dictionary) $(proguard_configuration)
else
- $(built_dex_intermediate): .KATI_IMPLICIT_OUTPUTS := $(proguard_dictionary)
+ $(built_dex_intermediate): .KATI_IMPLICIT_OUTPUTS := $(proguard_dictionary) $(proguard_configuration)
endif
endif
diff --git a/core/tasks/test_mapping.mk b/core/tasks/test_mapping.mk
index 36275b0..da64cab 100644
--- a/core/tasks/test_mapping.mk
+++ b/core/tasks/test_mapping.mk
@@ -12,7 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# Create an artifact to include TEST_MAPPING files in source tree.
+# Create an artifact to include TEST_MAPPING files in source tree. Also include
+# a file (out/disabled-presubmit-tests) containing the tests that should be
+# skipped in presubmit check.
.PHONY: test_mapping
@@ -21,13 +23,15 @@
test_mapping_list := $(OUT_DIR)/.module_paths/TEST_MAPPING.list
test_mappings := $(file <$(test_mapping_list))
$(test_mappings_zip) : PRIVATE_test_mappings := $(subst $(newline),\n,$(test_mappings))
+$(test_mappings_zip) : PRIVATE_all_disabled_presubmit_tests := $(ALL_DISABLED_PRESUBMIT_TESTS)
$(test_mappings_zip) : $(test_mappings) $(SOONG_ZIP)
- @echo "Building artifact to include TEST_MAPPING files."
- rm -rf $@
+ @echo "Building artifact to include TEST_MAPPING files and tests to skip in presubmit check."
+ rm -rf $@ $(dir $@)/disabled-presubmit-tests
+ echo $(sort $(PRIVATE_all_disabled_presubmit_tests)) | tr " " "\n" > $(dir $@)/disabled-presubmit-tests
echo -e "$(PRIVATE_test_mappings)" > $@.list
- $(SOONG_ZIP) -o $@ -C . -l $@.list
- rm -f $@.list
+ $(SOONG_ZIP) -o $@ -C . -l $@.list -C $(dir $@) -f $(dir $@)/disabled-presubmit-tests
+ rm -f $@.list $(dir $@)/disabled-presubmit-tests
test_mapping : $(test_mappings_zip)
diff --git a/core/version_defaults.mk b/core/version_defaults.mk
index e83d6fa..773dc24 100644
--- a/core/version_defaults.mk
+++ b/core/version_defaults.mk
@@ -56,6 +56,13 @@
$(warning Invalid TARGET_PLATFORM_VERSION '$(TARGET_PLATFORM_VERSION)', must be one of)
$(error $(ALLOWED_VERSIONS))
endif
+ALLOWED_VERSIONS :=
+MIN_PLATFORM_VERSION :=
+MAX_PLATFORM_VERSION :=
+
+.KATI_READONLY := \
+ DEFAULT_PLATFORM_VERSION \
+ TARGET_PLATFORM_VERSION
# Default versions for each TARGET_PLATFORM_VERSION
# TODO: PLATFORM_VERSION, PLATFORM_SDK_VERSION, etc. should be conditional
@@ -88,6 +95,7 @@
PLATFORM_VERSION := $(TARGET_PLATFORM_VERSION)
endif
endif
+.KATI_READONLY := PLATFORM_VERSION
ifndef PLATFORM_SDK_VERSION
# This is the canonical definition of the SDK version, which defines
@@ -108,6 +116,7 @@
# cts/tests/tests/os/assets/platform_versions.txt
PLATFORM_SDK_VERSION := 27
endif
+.KATI_READONLY := PLATFORM_SDK_VERSION
ifndef PLATFORM_VERSION_CODENAME
PLATFORM_VERSION_CODENAME := $(PLATFORM_VERSION_CODENAME.$(TARGET_PLATFORM_VERSION))
@@ -153,6 +162,10 @@
$(subst $(space),$(comma),$(strip $(PLATFORM_VERSION_FUTURE_CODENAMES)))
endif
+.KATI_READONLY := \
+ PLATFORM_VERSION_CODENAME \
+ PLATFORM_VERSION_ALL_CODENAMES \
+ PLATFORM_VERSION_FUTURE_CODENAMES
ifeq (REL,$(PLATFORM_VERSION_CODENAME))
PLATFORM_PREVIEW_SDK_VERSION := 0
@@ -170,6 +183,7 @@
PLATFORM_PREVIEW_SDK_VERSION := 0
endif
endif
+.KATI_READONLY := PLATFORM_PREVIEW_SDK_VERSION
ifndef DEFAULT_APP_TARGET_SDK
# This is the default minSdkVersion and targetSdkVersion to use for
@@ -183,6 +197,7 @@
DEFAULT_APP_TARGET_SDK := $(PLATFORM_VERSION_CODENAME)
endif
endif
+.KATI_READONLY := DEFAULT_APP_TARGET_SDK
ifndef PLATFORM_VNDK_VERSION
# This is the definition of the VNDK version for the current VNDK libraries.
@@ -201,6 +216,7 @@
PLATFORM_VNDK_VERSION := $(PLATFORM_VERSION_CODENAME)
endif
endif
+.KATI_READONLY := PLATFORM_VNDK_VERSION
ifndef PLATFORM_SYSTEMSDK_MIN_VERSION
# This is the oldest version of system SDK that the platform supports. Contrary
@@ -212,6 +228,7 @@
# should later (in post P) be set to a number, like 28.
PLATFORM_SYSTEMSDK_MIN_VERSION :=
endif
+.KATI_READONLY := PLATFORM_SYSTEMSDK_MIN_VERSION
# This is the list of system SDK versions that the current platform supports.
PLATFORM_SYSTEMSDK_VERSIONS :=
@@ -227,6 +244,7 @@
PLATFORM_SYSTEMSDK_VERSIONS += $(PLATFORM_VERSION_CODENAME)
endif
PLATFORM_SYSTEMSDK_VERSIONS := $(strip $(sort $(PLATFORM_SYSTEMSDK_VERSIONS)))
+.KATI_READONLY := PLATFORM_SYSTEMSDK_VERSIONS
ifndef PLATFORM_SECURITY_PATCH
# Used to indicate the security patch that has been applied to the device.
@@ -236,6 +254,7 @@
# If there is no $PLATFORM_SECURITY_PATCH set, keep it empty.
PLATFORM_SECURITY_PATCH := 2017-12-01
endif
+.KATI_READONLY := PLATFORM_SECURITY_PATCH
ifndef PLATFORM_BASE_OS
# Used to indicate the base os applied to the device.
@@ -244,6 +263,7 @@
# If there is no $PLATFORM_BASE_OS set, keep it empty.
PLATFORM_BASE_OS :=
endif
+.KATI_READONLY := PLATFORM_BASE_OS
ifndef BUILD_ID
# Used to signify special builds. E.g., branches and/or releases,
@@ -253,6 +273,7 @@
# If there is no BUILD_ID set, make it obvious.
BUILD_ID := UNKNOWN
endif
+.KATI_READONLY := BUILD_ID
ifndef BUILD_DATETIME
# Used to reproduce builds by setting the same time. Must be the number
@@ -265,11 +286,12 @@
else
DATE := date -d @$(BUILD_DATETIME)
endif
+.KATI_READONLY := DATE
# Everything should be using BUILD_DATETIME_FROM_FILE instead.
# BUILD_DATETIME and DATE can be removed once BUILD_NUMBER moves
# to soong_ui.
-BUILD_DATETIME :=
+$(KATI_obsolete_var BUILD_DATETIME,Use BUILD_DATETIME_FROM_FILE)
HAS_BUILD_NUMBER := true
ifndef BUILD_NUMBER
@@ -285,3 +307,4 @@
BUILD_NUMBER := eng.$(shell echo $${USER:0:6}).$(shell $(DATE) +%Y%m%d.%H%M%S)
HAS_BUILD_NUMBER := false
endif
+.KATI_READONLY := BUILD_NUMBER HAS_BUILD_NUMBER
diff --git a/tools/droiddoc/test/generics/Android.mk b/tools/droiddoc/test/generics/Android.mk
deleted file mode 100644
index 0c808fd..0000000
--- a/tools/droiddoc/test/generics/Android.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright (C) 2008 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.
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:=$(call all-subdir-java-files)
-
-LOCAL_MODULE:=test_generics
-LOCAL_DROIDDOC_OPTIONS:=\
- -stubs __test_generics__
-
-LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=tools/droiddoc/templates-google
-LOCAL_DROIDDOC_CUSTOM_ASSET_DIR:=assets-google
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-
-include $(BUILD_DROIDDOC)
diff --git a/tools/droiddoc/test/stubs/Android.mk b/tools/droiddoc/test/stubs/Android.mk
deleted file mode 100644
index fc971e1..0000000
--- a/tools/droiddoc/test/stubs/Android.mk
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright (C) 2008 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.
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:=$(call all-java-files-under,src)
-
-LOCAL_MODULE:=test_stubs
-LOCAL_DROIDDOC_OPTIONS:=\
- -stubs $(OUT_DIR)/__test_stubs__
-
-LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=tools/droiddoc/templates-google
-LOCAL_DROIDDOC_CUSTOM_ASSET_DIR:=assets-google
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-
-include $(BUILD_DROIDDOC)
-
diff --git a/tools/releasetools/add_img_to_target_files.py b/tools/releasetools/add_img_to_target_files.py
index f68976e..a041157 100755
--- a/tools/releasetools/add_img_to_target_files.py
+++ b/tools/releasetools/add_img_to_target_files.py
@@ -405,7 +405,7 @@
if os.path.exists(image_path):
continue
found = False
- for dir_name in ['IMAGES', 'RADIO', 'VENDOR_IMAGES', 'PREBUILT_IMAGES']:
+ for dir_name in ['IMAGES', 'RADIO', 'PREBUILT_IMAGES']:
alt_path = os.path.join(
OPTIONS.input_tmp, dir_name, os.path.basename(image_path))
if os.path.exists(alt_path):
@@ -488,9 +488,8 @@
def AddRadioImagesForAbOta(output_zip, ab_partitions):
"""Adds the radio images needed for A/B OTA to the output file.
- It parses the list of A/B partitions, looks for the missing ones from RADIO/
- or VENDOR_IMAGES/ dirs, and copies them to IMAGES/ of the output file (or
- dir).
+ It parses the list of A/B partitions, looks for the missing ones from RADIO/,
+ and copies them to IMAGES/ of the output file (or dir).
It also ensures that on returning from the function all the listed A/B
partitions must have their images available under IMAGES/.
@@ -518,17 +517,6 @@
shutil.copy(img_radio_path, prebuilt_path)
continue
- # Walk through VENDOR_IMAGES/ since files could be under subdirs.
- img_vendor_dir = os.path.join(OPTIONS.input_tmp, "VENDOR_IMAGES")
- for root, _, files in os.walk(img_vendor_dir):
- if img_name in files:
- if output_zip:
- common.ZipWrite(output_zip, os.path.join(root, img_name),
- "IMAGES/" + img_name)
- else:
- shutil.copy(os.path.join(root, img_name), prebuilt_path)
- break
-
# Assert that the image is present under IMAGES/ now.
if output_zip:
# Zip spec says: All slashes MUST be forward slashes.
@@ -763,9 +751,9 @@
with open(ab_partitions_txt, 'r') as f:
ab_partitions = f.readlines()
- # For devices using A/B update, copy over images from RADIO/ and/or
- # VENDOR_IMAGES/ to IMAGES/ and make sure we have all the needed
- # images ready under IMAGES/. All images should have '.img' as extension.
+ # For devices using A/B update, copy over images from RADIO/ to IMAGES/ and
+ # make sure we have all the needed images ready under IMAGES/. All images
+ # should have '.img' as extension.
AddRadioImagesForAbOta(output_zip, ab_partitions)
# Generate care_map.txt for system and vendor partitions (if present), then
diff --git a/tools/releasetools/test_add_img_to_target_files.py b/tools/releasetools/test_add_img_to_target_files.py
index 9a0f78e..e272ef2 100644
--- a/tools/releasetools/test_add_img_to_target_files.py
+++ b/tools/releasetools/test_add_img_to_target_files.py
@@ -85,30 +85,6 @@
for image in images:
self.assertIn('IMAGES/' + image + '.img', verify_zip.namelist())
- def test_AddRadioImagesForAbOta_copyFromVendorImages(self):
- """Tests the case that copies images from VENDOR_IMAGES/."""
- vendor_images_path = os.path.join(OPTIONS.input_tmp, 'VENDOR_IMAGES')
- os.mkdir(vendor_images_path)
-
- partitions = ['aboot', 'xbl']
- for index, partition in enumerate(partitions):
- subdir = os.path.join(vendor_images_path, 'subdir-{}'.format(index))
- os.mkdir(subdir)
-
- partition_image_path = os.path.join(subdir, partition + '.img')
- with open(partition_image_path, 'wb') as partition_fp:
- partition_fp.write(partition.encode())
-
- # Set up the output dir.
- images_path = os.path.join(OPTIONS.input_tmp, 'IMAGES')
- os.mkdir(images_path)
-
- AddRadioImagesForAbOta(None, partitions)
-
- for partition in partitions:
- self.assertTrue(
- os.path.exists(os.path.join(images_path, partition + '.img')))
-
def test_AddRadioImagesForAbOta_missingImages(self):
images, _ = self._create_images(['aboot', 'xbl'], 'RADIO')
self.assertRaises(AssertionError, AddRadioImagesForAbOta, None,