Fix test suite data files issue.
The current test suite rule implementation has a bug where test data files are excluded from the final suite zip files when a suite doesn't have a designated testcases output directory, which is represented by COMPATIBILITY_TESTCASES_OUT_$(suite_name). Specifically, the rule that collects test data files for each suite filters out suite output paths that conflict with module output paths, which happens when a suite doesn't have its own testcases output directory. It seems to have been done this way just to avoid make rule conflict errors, but it ended up causing missing test data files. This change fixes it by adding an indexing purpose only test suit file variable. Fixes: 140761783 Test: m general-tests Test: Compared before vs after, no meaningful differences. Test: Changed bc-tests to a device test and built general-tests. Test: Before - data files missing, after - data files present Change-Id: I2008992f4144c6ee115f4b4e4ac9caa4312bbe34
This commit is contained in:
@@ -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
|
||||
|
||||
|
@@ -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, \
|
||||
|
Reference in New Issue
Block a user