aboutsummaryrefslogtreecommitdiff
path: root/core/base_rules.mk
diff options
context:
space:
mode:
Diffstat (limited to 'core/base_rules.mk')
-rw-r--r--core/base_rules.mk34
1 files changed, 29 insertions, 5 deletions
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 4c9281492a..86028a909b 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -393,8 +393,8 @@ endif
logtags_sources := $(filter %.logtags,$(LOCAL_SRC_FILES)) $(LOCAL_LOGTAGS_FILES)
-ifneq ($(strip $(logtags_sources)),)
-event_log_tags := $(foreach f,$(addprefix $(LOCAL_PATH)/,$(logtags_sources)),$(call clean-path,$(f)))
+ifneq ($(strip $(logtags_sources) $(LOCAL_SOONG_LOGTAGS_FILES)),)
+event_log_tags := $(foreach f,$(LOCAL_SOONG_LOGTAGS_FILES) $(addprefix $(LOCAL_PATH)/,$(logtags_sources)),$(call clean-path,$(f)))
else
event_log_tags :=
endif
@@ -716,6 +716,14 @@ else
test_config := $(wildcard $(LOCAL_PATH)/AndroidTest.xml)
endif
+ifeq ($(EXCLUDE_MCTS),true)
+ ifneq (,$(test_config))
+ ifneq (,$(filter mcts-%,$(LOCAL_COMPATIBILITY_SUITE)))
+ LOCAL_COMPATIBILITY_SUITE := $(filter-out cts,$(LOCAL_COMPATIBILITY_SUITE))
+ endif
+ endif
+endif
+
ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE))
# If we are building a native test or benchmark and its stem variants are not defined,
@@ -760,6 +768,10 @@ $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
$(LOCAL_BUILT_MODULE):$(dir)/$(my_installed_module_stem)))) \
$(eval my_compat_dist_config_$(suite) := ))
+ifneq (,$(LOCAL_SOONG_CLASSES_JAR))
+ $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
+ $(eval my_compat_api_map_$(suite) += $(LOCAL_SOONG_CLASSES_JAR)))
+endif
# Auto-generate build config.
ifeq (,$(test_config))
@@ -813,6 +825,12 @@ else
$(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
$(s):$(dir)/$(n)))))
+ $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
+ $(eval my_compat_api_map_$(suite) += $(foreach f, $(LOCAL_COMPATIBILITY_SUPPORT_FILES), \
+ $(eval p := $(subst :,$(space),$(f))) \
+ $(eval s := $(word 1,$(p))) \
+ $(if $(filter %.apk,$(s)) $(filter %.jar,$(s)),$(s),))))
+
ifneq (,$(test_config))
$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
$(eval my_compat_dist_config_$(suite) += $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
@@ -855,7 +873,9 @@ $(foreach pair, $(my_test_data_file_pairs), \
$(call filter-copy-pair,$(src_path),$(call append-path,$(dir),$(file)),$(my_installed_test_data)))) \
$(eval my_compat_dist_test_data_$(suite) += \
$(foreach dir, $(call compatibility_suite_dirs,$(suite),$(arch_dir)), \
- $(filter $(my_installed_test_data),$(call append-path,$(dir),$(file)))))))
+ $(filter $(my_installed_test_data),$(call append-path,$(dir),$(file))))) \
+ $(eval my_compat_api_map_$(suite) += \
+ $(if $(filter %.apk,$(src_path)) $(filter %.jar,$(src_path)),$(src_path),))))
endif
else
ifneq ($(my_test_data_file_pairs),)
@@ -865,7 +885,9 @@ $(foreach pair, $(my_test_data_file_pairs), \
$(eval file := $(word 2,$(parts))) \
$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
$(eval my_compat_dist_$(suite) += $(foreach dir, $(call compatibility_suite_dirs,$(suite),$(arch_dir)), \
- $(src_path):$(call append-path,$(dir),$(file))))))
+ $(src_path):$(call append-path,$(dir),$(file)))) \
+ $(eval my_compat_api_map_$(suite) += \
+ $(if $(filter %.apk,$(src_path)) $(filter %.jar,$(src_path)),$(src_path),))))
endif
endif
@@ -877,7 +899,8 @@ is_native :=
$(call create-suite-dependencies)
$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
$(eval my_compat_dist_config_$(suite) := ) \
- $(eval my_compat_dist_test_data_$(suite) := ))
+ $(eval my_compat_dist_test_data_$(suite) := ) \
+ $(eval my_compat_api_map_$(suite) := ))
endif # LOCAL_UNINSTALLABLE_MODULE
@@ -1100,6 +1123,7 @@ ifndef LOCAL_SOONG_MODULE_INFO_JSON
$(LOCAL_JNI_SHARED_LIBRARIES)
endif
+ALL_MODULES.$(my_register_name).TEST_MODULE_CONFIG_BASE := $(LOCAL_TEST_MODULE_CONFIG_BASE)
##########################################################################
## When compiling against API imported module, use API import stub