diff --git a/core/base_rules.mk b/core/base_rules.mk index cce6ec193..f70911edc 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -705,13 +705,19 @@ endif ifeq ($(use_testcase_folder),true) ifneq ($(my_test_data_file_pairs),) +# Filter out existng installed test data paths when collecting test data files to be installed and +# indexed as they cause build rule conflicts. Instead put them in a separate list which is only +# used for indexing. $(foreach pair, $(my_test_data_file_pairs), \ $(eval parts := $(subst :,$(space),$(pair))) \ $(eval src_path := $(word 1,$(parts))) \ $(eval file := $(word 2,$(parts))) \ $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \ $(eval my_compat_dist_$(suite) += $(foreach dir, $(call compatibility_suite_dirs,$(suite),$(arch_dir)), \ - $(call filter-copy-pair,$(src_path),$(call append-path,$(dir),$(file)),$(my_installed_test_data)))))) + $(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))))))) endif else ifneq ($(my_test_data_file_pairs),) @@ -732,7 +738,8 @@ is_native := $(call create-suite-dependencies) $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \ - $(eval my_compat_dist_config_$(suite) := )) + $(eval my_compat_dist_config_$(suite) := ) \ + $(eval my_compat_dist_test_data_$(suite) := )) endif # LOCAL_COMPATIBILITY_SUITE diff --git a/core/definitions.mk b/core/definitions.mk index fb11ab6ff..3499da932 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -2897,7 +2897,8 @@ $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \ $(if $(filter $(suite),$(ALL_COMPATIBILITY_SUITES)),,$(eval ALL_COMPATIBILITY_SUITES += $(suite))) \ $(eval COMPATIBILITY.$(suite).FILES := \ $$(COMPATIBILITY.$(suite).FILES) $$(foreach f,$$(my_compat_dist_$(suite)),$$(call word-colon,2,$$(f))) \ - $$(foreach f,$$(my_compat_dist_config_$(suite)),$$(call word-colon,2,$$(f)))) \ + $$(foreach f,$$(my_compat_dist_config_$(suite)),$$(call word-colon,2,$$(f))) \ + $$(my_compat_dist_test_data_$(suite))) \ $(eval COMPATIBILITY.$(suite).MODULES := \ $$(COMPATIBILITY.$(suite).MODULES) $$(my_register_name))) \ $(eval $(my_all_targets) : $(call copy-many-files, \