Make RELEASE_PLATFORM_VERSION a release config flag to set platform version.
Bug: 282838389 Test: Treehugger Merged-In: Ic6dacbdee7d2408aa8b25b4df59bf9bbc566d747 Change-Id: Ie61a7d986c2b8fe2c16117f6678b9e5a71711647
This commit is contained in:
parent
d6df20a058
commit
6d7afa00e3
4 changed files with 9 additions and 10 deletions
|
@ -66,7 +66,7 @@ $(strip \
|
||||||
$(if $(filter $(ALL_VERSIONS),$(2)),,
|
$(if $(filter $(ALL_VERSIONS),$(2)),,
|
||||||
$(error Invalid MAX_PLATFORM_VERSION '$(2)'))
|
$(error Invalid MAX_PLATFORM_VERSION '$(2)'))
|
||||||
$(if $(filter $(ALL_VERSIONS),$(3)),,
|
$(if $(filter $(ALL_VERSIONS),$(3)),,
|
||||||
$(error Invalid DEFAULT_PLATFORM_VERSION '$(3)'))
|
$(error Invalid RELEASE_PLATFORM_VERSION '$(3)'))
|
||||||
|
|
||||||
$(eval allowed_versions_ := $(call find_and_earlier,$(ALL_VERSIONS),$(2)))
|
$(eval allowed_versions_ := $(call find_and_earlier,$(ALL_VERSIONS),$(2)))
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ $(strip \
|
||||||
$(filter-out $(call find_and_earlier,$(allowed_versions_),$(1)),$(allowed_versions_)))
|
$(filter-out $(call find_and_earlier,$(allowed_versions_),$(1)),$(allowed_versions_)))
|
||||||
|
|
||||||
$(if $(filter $(allowed_versions_),$(3)),,
|
$(if $(filter $(allowed_versions_),$(3)),,
|
||||||
$(error DEFAULT_PLATFORM_VERSION '$(3)' must be between MIN_PLATFORM_VERSION '$(1)' and MAX_PLATFORM_VERSION '$(2)'))
|
$(error RELEASE_PLATFORM_VERSION '$(3)' must be between MIN_PLATFORM_VERSION '$(1)' and MAX_PLATFORM_VERSION '$(2)'))
|
||||||
|
|
||||||
$(allowed_versions_))
|
$(allowed_versions_))
|
||||||
endef
|
endef
|
||||||
|
|
|
@ -40,8 +40,7 @@ ifdef INTERNAL_BUILD_ID_MAKEFILE
|
||||||
include $(INTERNAL_BUILD_ID_MAKEFILE)
|
include $(INTERNAL_BUILD_ID_MAKEFILE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DEFAULT_PLATFORM_VERSION := VP1A
|
# Set release configuration. The default resides in build/release/build_flags.mk.
|
||||||
.KATI_READONLY := DEFAULT_PLATFORM_VERSION
|
|
||||||
MIN_PLATFORM_VERSION := UP1A
|
MIN_PLATFORM_VERSION := UP1A
|
||||||
MAX_PLATFORM_VERSION := VP1A
|
MAX_PLATFORM_VERSION := VP1A
|
||||||
|
|
||||||
|
|
|
@ -14,17 +14,17 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
|
||||||
|
|
||||||
ALLOWED_VERSIONS := $(call allowed-platform-versions,\
|
ALLOWED_VERSIONS := $(call allowed-platform-versions,\
|
||||||
$(MIN_PLATFORM_VERSION),\
|
$(MIN_PLATFORM_VERSION),\
|
||||||
$(MAX_PLATFORM_VERSION),\
|
$(MAX_PLATFORM_VERSION),\
|
||||||
$(DEFAULT_PLATFORM_VERSION))
|
$(RELEASE_PLATFORM_VERSION))
|
||||||
|
|
||||||
ifndef TARGET_PLATFORM_VERSION
|
ifdef TARGET_PLATFORM_VERSION
|
||||||
TARGET_PLATFORM_VERSION := $(DEFAULT_PLATFORM_VERSION)
|
$(error Do not set TARGET_PLATFORM_VERSION directly. Use RELEASE_PLATFORM_VERSION. value: $(TARGET_PLATFORM_VERSION))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
TARGET_PLATFORM_VERSION := $(RELEASE_PLATFORM_VERSION)
|
||||||
|
|
||||||
ifeq (,$(filter $(ALLOWED_VERSIONS), $(TARGET_PLATFORM_VERSION)))
|
ifeq (,$(filter $(ALLOWED_VERSIONS), $(TARGET_PLATFORM_VERSION)))
|
||||||
$(warning Invalid TARGET_PLATFORM_VERSION '$(TARGET_PLATFORM_VERSION)', must be one of)
|
$(warning Invalid TARGET_PLATFORM_VERSION '$(TARGET_PLATFORM_VERSION)', must be one of)
|
||||||
$(error $(ALLOWED_VERSIONS))
|
$(error $(ALLOWED_VERSIONS))
|
||||||
|
|
|
@ -28,7 +28,7 @@ function check_lunch
|
||||||
[ "$TARGET_PLATFORM_VERSION" = "$4" ] || ( echo "lunch $1: expected TARGET_PLATFORM_VERSION='$4', got '$TARGET_PLATFORM_VERSION'" && exit 1 )
|
[ "$TARGET_PLATFORM_VERSION" = "$4" ] || ( echo "lunch $1: expected TARGET_PLATFORM_VERSION='$4', got '$TARGET_PLATFORM_VERSION'" && exit 1 )
|
||||||
)
|
)
|
||||||
|
|
||||||
default_version=$(get_build_var DEFAULT_PLATFORM_VERSION)
|
default_version=$(get_build_var RELEASE_PLATFORM_VERSION)
|
||||||
|
|
||||||
# lunch tests
|
# lunch tests
|
||||||
check_lunch "aosp_arm64" "aosp_arm64" "eng" ""
|
check_lunch "aosp_arm64" "aosp_arm64" "eng" ""
|
||||||
|
|
Loading…
Reference in a new issue