Fix treble sepolicy tests and combine_maps script am: b30e2f05f7

Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/3019087

Change-Id: I5fe8fe5751e20423b89057e6749828fc37f6f6e2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Inseob Kim 2024-03-29 13:17:53 +00:00 committed by Automerger Merge Worker
commit 8be48d0175
2 changed files with 8 additions and 7 deletions

View file

@ -41,8 +41,9 @@ def Combine(top, bottom):
if len(top_type_set) == 1:
continue
m = re.match(r"(\w+)_\d+_\d+", top_ta)
# Typeattributes in V.v.cil have _V_v suffix, but not in V.v.ignore.cil
m = re.fullmatch(r"(\w+?)_\d+(_0)?", top_ta)
# Typeattributes in V(.0).cil have _V(_0) suffix, but not in
# V(.0).ignore.cil
bottom_type = m.group(1) if m else top_ta
# If type doesn't exist in bottom map, no need to maintain mappings to

View file

@ -15,7 +15,7 @@ IS_TREBLE_TEST_ENABLED_PARTNER := false
ifeq ($(filter 26.0 27.0 28.0 29.0,$(version)),)
ifneq (,$(BOARD_SYSTEM_EXT_PREBUILT_DIR)$(BOARD_PRODUCT_PREBUILT_DIR))
IS_TREBLE_TEST_ENABLED_PARTNER := true
endif # (,$(SYSTEM_EXT_PREBUILT_POLICY)$(PRODUCT_PREBUILT_POLICY))
endif # (,$(BOARD_SYSTEM_EXT_PREBUILT_DIR)$(BOARD_PRODUCT_PREBUILT_DIR))
endif # ($(filter 26.0 27.0 28.0 29.0,$(version)),)
include $(BUILD_SYSTEM)/base_rules.mk
@ -30,18 +30,18 @@ $(version)_mapping.cil := $(call intermediates-dir-for,ETC,plat_$(version).cil)/
$(version)_mapping.ignore.cil := \
$(call intermediates-dir-for,ETC,$(version).ignore.cil)/$(version).ignore.cil
ifeq ($(IS_TREBLE_TEST_ENABLED_PARTNER),true)
ifneq (,$(SYSTEM_EXT_PREBUILT_POLICY))
ifneq (,$(BOARD_SYSTEM_EXT_PREBUILT_DIR))
$(version)_mapping.cil += \
$(call intermediates-dir-for,ETC,system_ext_$(version).cil)/system_ext_$(version).cil
$(version)_mapping.ignore.cil += \
$(call intermediates-dir-for,ETC,system_ext_$(version).ignore.cil)/system_ext_$(version).ignore.cil
endif # (,$(SYSTEM_EXT_PREBUILT_POLICY))
ifneq (,$(PRODUCT_PREBUILT_POLICY))
endif # (,$(BOARD_SYSTEM_EXT_PREBUILT_DIR))
ifneq (,$(BOARD_PRODUCT_PREBUILT_DIR))
$(version)_mapping.cil += \
$(call intermediates-dir-for,ETC,product_$(version).cil)/product_$(version).cil
$(version)_mapping.ignore.cil += \
$(call intermediates-dir-for,ETC,product_$(version).ignore.cil)/product_$(version).ignore.cil
endif # (,$(PRODUCT_PREBUILT_POLICY))
endif # (,$(BOARD_PRODUCT_PREBUILT_DIR))
endif #($(IS_TREBLE_TEST_ENABLED_PARTNER),true)
# $(version)_mapping.combined.cil - a combination of the mapping file used when