77c44fc420
build_test_only is used to denote rules that should not verified as part of compliance testing. Use this macro to exclude neverallow rules which we want to check as part of build, but not CTS. Bug: 80499271 Test: SELinuxNeverallowRulesTest on walleye has no more failure of type "Type or attribute * used in neverallow undefined in policy being checked." Number of failing test cases is reduced by 142. Test: policy.conf used to check neverallows at build-time still retains all neverallow rules. Change-Id: I5f1b383d9096bb5a7b8c0f1bc008b5dd07419580
17 lines
727 B
Makefile
17 lines
727 B
Makefile
# Command to turn collection of policy files into a policy.conf file to be
|
|
# processed by checkpolicy
|
|
define transform-policy-to-conf
|
|
@mkdir -p $(dir $@)
|
|
$(hide) m4 $(PRIVATE_ADDITIONAL_M4DEFS) \
|
|
-D mls_num_sens=$(PRIVATE_MLS_SENS) -D mls_num_cats=$(PRIVATE_MLS_CATS) \
|
|
-D target_build_variant=$(PRIVATE_TARGET_BUILD_VARIANT) \
|
|
-D target_with_dexpreopt=$(WITH_DEXPREOPT) \
|
|
-D target_arch=$(PRIVATE_TGT_ARCH) \
|
|
-D target_with_asan=$(PRIVATE_TGT_WITH_ASAN) \
|
|
-D target_full_treble=$(PRIVATE_SEPOLICY_SPLIT) \
|
|
-D target_compatible_property=$(PRIVATE_COMPATIBLE_PROPERTY) \
|
|
-D target_exclude_build_test=$(PRIVATE_EXCLUDE_BUILD_TEST) \
|
|
$(PRIVATE_TGT_RECOVERY) \
|
|
-s $^ > $@
|
|
endef
|
|
.KATI_READONLY := transform-policy-to-conf
|