From 4e143cdc8571ee008fb43d493bee18d44c076f61 Mon Sep 17 00:00:00 2001 From: Dan Shi Date: Tue, 18 Feb 2020 13:38:38 -0800 Subject: [PATCH] Change vts-core package to generic *ts package rule The current package logic is based on general-tests and device-tests, which have special rules to package test artifacts in a diffrent way. vts-core suite should follow the generic *ts package rule. Bug: 149249068 Test: m -j vts-core && vts-core-tradefed run some vts-core test Change-Id: Ib6ab7eb0fb4b8c898a0b3617d10be04dc98c2daa --- core/tasks/vts-core-tests.mk | 38 +++--------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) diff --git a/core/tasks/vts-core-tests.mk b/core/tasks/vts-core-tests.mk index 95b729ab7..919c08dc5 100644 --- a/core/tasks/vts-core-tests.mk +++ b/core/tasks/vts-core-tests.mk @@ -12,45 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -.PHONY: vts-core - -vts-core-zip := $(PRODUCT_OUT)/vts-core-tests.zip -# Create an artifact to include a list of test config files in vts-core. -vts-core-list-zip := $(PRODUCT_OUT)/vts-core_list.zip -# Create an artifact to include all test config files in vts-core. -vts-core-configs-zip := $(PRODUCT_OUT)/vts-core_configs.zip -my_host_shared_lib_for_vts_core := $(call copy-many-files,$(COMPATIBILITY.vts-core.HOST_SHARED_LIBRARY.FILES)) -$(vts-core-zip) : .KATI_IMPLICIT_OUTPUTS := $(vts-core-list-zip) $(vts-core-configs-zip) -$(vts-core-zip) : PRIVATE_vts_core_list := $(PRODUCT_OUT)/vts-core_list -$(vts-core-zip) : PRIVATE_HOST_SHARED_LIBS := $(my_host_shared_lib_for_vts_core) -$(vts-core-zip) : $(COMPATIBILITY.vts-core.FILES) $(my_host_shared_lib_for_vts_core) $(SOONG_ZIP) - echo $(sort $(COMPATIBILITY.vts-core.FILES)) | tr " " "\n" > $@.list - grep $(HOST_OUT_TESTCASES) $@.list > $@-host.list || true - grep -e .*\\.config$$ $@-host.list > $@-host-test-configs.list || true - $(hide) for shared_lib in $(PRIVATE_HOST_SHARED_LIBS); do \ - echo $$shared_lib >> $@-host.list; \ - done - grep $(TARGET_OUT_TESTCASES) $@.list > $@-target.list || true - grep -e .*\\.config$$ $@-target.list > $@-target-test-configs.list || true - $(hide) $(SOONG_ZIP) -d -o $@ -P host -C $(HOST_OUT) -l $@-host.list -P target -C $(PRODUCT_OUT) -l $@-target.list - $(hide) $(SOONG_ZIP) -d -o $(vts-core-configs-zip) \ - -P host -C $(HOST_OUT) -l $@-host-test-configs.list \ - -P target -C $(PRODUCT_OUT) -l $@-target-test-configs.list - rm -f $(PRIVATE_vts_core_list) - $(hide) grep -e .*\\.config$$ $@-host.list | sed s%$(HOST_OUT)%host%g > $(PRIVATE_vts_core_list) - $(hide) grep -e .*\\.config$$ $@-target.list | sed s%$(PRODUCT_OUT)%target%g >> $(PRIVATE_vts_core_list) - $(hide) $(SOONG_ZIP) -d -o $(vts-core-list-zip) -C $(dir $@) -f $(PRIVATE_vts_core_list) - rm -f $@.list $@-host.list $@-target.list $@-host-test-configs.list $@-target-test-configs.list \ - $(PRIVATE_vts_core_list) - -vts-core: $(vts-core-zip) - test_suite_name := vts-core test_suite_tradefed := vts-core-tradefed test_suite_readme := test/vts/tools/vts-core-tradefed/README include $(BUILD_SYSTEM)/tasks/tools/compatibility.mk -vts-core: $(compatibility_zip) -$(call dist-for-goals, vts-core, $(vts-core-zip) $(vts-core-list-zip) $(vts-core-configs-zip) $(compatibility_zip)) +.PHONY: vts-core +vts-core: $(compatibility_zip) +$(call dist-for-goals, vts-core, $(compatibility_zip)) tests: vts-core