diff --git a/core/tasks/cts.mk b/core/tasks/cts.mk index 16b5c49275..876d77a641 100644 --- a/core/tasks/cts.mk +++ b/core/tasks/cts.mk @@ -20,8 +20,8 @@ test_suite_readme := cts/tools/cts-tradefed/README include $(BUILD_SYSTEM)/tasks/tools/compatibility.mk .PHONY: cts -cts: $(compatibility_zip) -$(call dist-for-goals, cts, $(compatibility_zip)) +cts: $(compatibility_zip) $(compatibility_tests_list_zip) +$(call dist-for-goals, cts, $(compatibility_zip) $(compatibility_tests_list_zip)) .PHONY: cts_v2 cts_v2: cts diff --git a/core/tasks/tools/compatibility.mk b/core/tasks/tools/compatibility.mk index 7d08a2f2e7..47cf4400dd 100644 --- a/core/tasks/tools/compatibility.mk +++ b/core/tasks/tools/compatibility.mk @@ -80,13 +80,18 @@ $(eval $(call combine-notice-files, html, \ compatibility_zip_deps += $(test_suite_notice_txt) compatibility_zip_resources += $(test_suite_notice_txt) +compatibility_tests_list_zip := $(out_dir)-tests_list.zip + compatibility_zip := $(out_dir).zip +$(compatibility_zip) : .KATI_IMPLICIT_OUTPUTS := $(compatibility_tests_list_zip) $(compatibility_zip): PRIVATE_OUT_DIR := $(out_dir) $(compatibility_zip): PRIVATE_TOOLS := $(test_tools) $(test_suite_prebuilt_tools) $(compatibility_zip): PRIVATE_SUITE_NAME := $(test_suite_name) $(compatibility_zip): PRIVATE_DYNAMIC_CONFIG := $(test_suite_dynamic_config) $(compatibility_zip): PRIVATE_RESOURCES := $(compatibility_zip_resources) $(compatibility_zip): PRIVATE_JDK := $(test_suite_jdk) +$(compatibility_zip): PRIVATE_tests_list := $(out_dir)-tests_list +$(compatibility_zip): PRIVATE_tests_list_zip := $(compatibility_tests_list_zip) $(compatibility_zip): $(compatibility_zip_deps) | $(ADB) $(ACP) # Make dir structure mkdir -p $(PRIVATE_OUT_DIR)/tools $(PRIVATE_OUT_DIR)/testcases @@ -99,6 +104,11 @@ $(compatibility_zip): $(compatibility_zip_deps) | $(ADB) $(ACP) $(SOONG_ZIP) -d -o $@.tmp -C $(dir $@) -l $@.list $(MERGE_ZIPS) $@ $@.tmp $(PRIVATE_JDK) rm -f $@.tmp +# Build a list of tests + rm -f $(PRIVATE_tests_list) + $(hide) grep -e .*\\.config$$ $@.list | sed s%$(PRIVATE_OUT_DIR)/testcases/%%g > $(PRIVATE_tests_list) + $(SOONG_ZIP) -d -o $(PRIVATE_tests_list_zip) -j -f $(PRIVATE_tests_list) + rm -f $(PRIVATE_tests_list) # Reset all input variables test_suite_name := diff --git a/core/tasks/vts-core-tests.mk b/core/tasks/vts-core-tests.mk index 95c4d24a97..3c838b5695 100644 --- a/core/tasks/vts-core-tests.mk +++ b/core/tasks/vts-core-tests.mk @@ -44,7 +44,7 @@ include $(BUILD_SYSTEM)/tasks/tools/compatibility.mk $(compatibility_zip): $(copy_kernel_tests) .PHONY: vts -vts: $(compatibility_zip) -$(call dist-for-goals, vts, $(compatibility_zip)) +vts: $(compatibility_zip) $(compatibility_tests_list_zip) +$(call dist-for-goals, vts, $(compatibility_zip) $(compatibility_tests_list_zip)) tests: vts