Merge "Use prebuilts for compat test if prebuilts exist" into main am: 6952d2f612 am: 8d022b888c

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

Change-Id: Ifca26b74f951dec92838956a2c0a9eb0912ffa7d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2023-09-08 05:25:55 +00:00 committed by Automerger Merge Worker
commit 11d5dd1de3
7 changed files with 131 additions and 11 deletions

View file

@ -550,24 +550,24 @@ file_contexts.modules.tmp :=
# Tests for Treble compatibility of current platform policy and vendor policy of
# given release version.
built_plat_sepolicy := $(call intermediates-dir-for,ETC,base_plat_sepolicy)/base_plat_sepolicy
built_system_ext_sepolicy := $(call intermediates-dir-for,ETC,base_system_ext_sepolicy)/base_system_ext_sepolicy
built_product_sepolicy := $(call intermediates-dir-for,ETC,base_product_sepolicy)/base_product_sepolicy
base_plat_pub_policy.cil := $(call intermediates-dir-for,ETC,base_plat_pub_policy.cil)/base_plat_pub_policy.cil
base_system_ext_pub_polcy.cil := $(call intermediates-dir-for,ETC,base_system_ext_pub_polcy.cil)/base_system_ext_pub_polcy.cil
base_product_pub_policy.cil := $(call intermediates-dir-for,ETC,base_product_pub_policy.cil)/base_product_pub_policy.cil
ver := $(PLATFORM_SEPOLICY_VERSION)
ifneq ($(wildcard $(LOCAL_PATH)/prebuilts/api/$(PLATFORM_SEPOLICY_VERSION)),)
# If PLATFORM_SEPOLICY_VERSION is already frozen, use prebuilts for compat test
base_plat_pub_policy.cil := $(call intermediates-dir-for,ETC,$(ver)_plat_pub_policy.cil)/$(ver)_plat_pub_policy.cil
base_product_pub_policy.cil := $(call intermediates-dir-for,ETC,$(ver)_product_pub_policy.cil)/$(ver)_product_pub_policy.cil
else
# If not, use ToT for compat test
base_plat_pub_policy.cil := $(call intermediates-dir-for,ETC,base_plat_pub_policy.cil)/base_plat_pub_policy.cil
base_product_pub_policy.cil := $(call intermediates-dir-for,ETC,base_product_pub_policy.cil)/base_product_pub_policy.cil
endif
ver :=
$(foreach v,$(PLATFORM_SEPOLICY_COMPAT_VERSIONS), \
$(eval version_under_treble_tests := $(v)) \
$(eval include $(LOCAL_PATH)/treble_sepolicy_tests_for_release.mk) \
)
built_plat_sepolicy :=
built_system_ext_sepolicy :=
built_product_sepolicy :=
base_plat_pub_policy.cil :=
base_system_ext_pub_polcy.cil :=
base_product_pub_policy.cil :=
#################################

View file

@ -27,6 +27,26 @@ se_policy_cil {
installable: false,
}
se_policy_conf {
name: "29.0_product_pub_policy.conf",
srcs: [
":se_build_files{.plat_public_29.0}",
":se_build_files{.system_ext_public_29.0}",
":se_build_files{.product_public_29.0}",
":se_build_files{.reqd_mask}",
],
installable: false,
build_variant: "user",
}
se_policy_cil {
name: "29.0_product_pub_policy.cil",
src: ":29.0_product_pub_policy.conf",
filter_out: [":reqd_policy_mask.cil"],
secilc_check: false,
installable: false,
}
se_policy_conf {
name: "29.0_plat_policy.conf",
srcs: [

View file

@ -27,6 +27,26 @@ se_policy_cil {
installable: false,
}
se_policy_conf {
name: "30.0_product_pub_policy.conf",
srcs: [
":se_build_files{.plat_public_30.0}",
":se_build_files{.system_ext_public_30.0}",
":se_build_files{.product_public_30.0}",
":se_build_files{.reqd_mask}",
],
installable: false,
build_variant: "user",
}
se_policy_cil {
name: "30.0_product_pub_policy.cil",
src: ":30.0_product_pub_policy.conf",
filter_out: [":reqd_policy_mask.cil"],
secilc_check: false,
installable: false,
}
se_policy_conf {
name: "30.0_plat_policy.conf",
srcs: [

View file

@ -27,6 +27,26 @@ se_policy_cil {
installable: false,
}
se_policy_conf {
name: "31.0_product_pub_policy.conf",
srcs: [
":se_build_files{.plat_public_31.0}",
":se_build_files{.system_ext_public_31.0}",
":se_build_files{.product_public_31.0}",
":se_build_files{.reqd_mask}",
],
installable: false,
build_variant: "user",
}
se_policy_cil {
name: "31.0_product_pub_policy.cil",
src: ":31.0_product_pub_policy.conf",
filter_out: [":reqd_policy_mask.cil"],
secilc_check: false,
installable: false,
}
se_policy_conf {
name: "31.0_plat_policy.conf",
srcs: [

View file

@ -27,6 +27,26 @@ se_policy_cil {
installable: false,
}
se_policy_conf {
name: "32.0_product_pub_policy.conf",
srcs: [
":se_build_files{.plat_public_32.0}",
":se_build_files{.system_ext_public_32.0}",
":se_build_files{.product_public_32.0}",
":se_build_files{.reqd_mask}",
],
installable: false,
build_variant: "user",
}
se_policy_cil {
name: "32.0_product_pub_policy.cil",
src: ":32.0_product_pub_policy.conf",
filter_out: [":reqd_policy_mask.cil"],
secilc_check: false,
installable: false,
}
se_policy_conf {
name: "32.0_plat_policy.conf",
srcs: [

View file

@ -27,6 +27,26 @@ se_policy_cil {
installable: false,
}
se_policy_conf {
name: "33.0_product_pub_policy.conf",
srcs: [
":se_build_files{.plat_public_33.0}",
":se_build_files{.system_ext_public_33.0}",
":se_build_files{.product_public_33.0}",
":se_build_files{.reqd_mask}",
],
installable: false,
build_variant: "user",
}
se_policy_cil {
name: "33.0_product_pub_policy.cil",
src: ":33.0_product_pub_policy.conf",
filter_out: [":reqd_policy_mask.cil"],
secilc_check: false,
installable: false,
}
se_policy_conf {
name: "33.0_plat_policy.conf",
srcs: [

View file

@ -27,6 +27,26 @@ se_policy_cil {
installable: false,
}
se_policy_conf {
name: "34.0_product_pub_policy.conf",
srcs: [
":se_build_files{.plat_public_34.0}",
":se_build_files{.system_ext_public_34.0}",
":se_build_files{.product_public_34.0}",
":se_build_files{.reqd_mask}",
],
installable: false,
build_variant: "user",
}
se_policy_cil {
name: "34.0_product_pub_policy.cil",
src: ":34.0_product_pub_policy.conf",
filter_out: [":reqd_policy_mask.cil"],
secilc_check: false,
installable: false,
}
se_policy_conf {
name: "34.0_plat_policy.conf",
srcs: [