Merge "Allow compatibility suite also build a test list" am: 7fe5450be2 am: 30e367dbb4

Original change: https://android-review.googlesource.com/c/platform/build/+/1844555

Change-Id: I1ccd60fedef28857ccb4aee70b828942c18d17cf
This commit is contained in:
Treehugger Robot 2021-10-04 21:13:54 +00:00 committed by Automerger Merge Worker
commit 4d15c8b486
3 changed files with 14 additions and 4 deletions

View file

@ -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

View file

@ -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 :=

View file

@ -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