From c8f21f6c4e5a20eeeb4f0877c1b988dd84c47a14 Mon Sep 17 00:00:00 2001 From: Simran Basi Date: Tue, 14 Mar 2017 15:40:33 -0700 Subject: [PATCH] device-tests & general-tests: build out zips. Generates the output zips of the device-tests & general-tests buildable suites. Bug: 35386840 Test: make dist device-tests general-tests -j Change-Id: I253bcd8615379334b52b4d770a5c4f7e07a58795 --- core/tasks/device-tests.mk | 12 +++++++++++- core/tasks/general-tests.mk | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/core/tasks/device-tests.mk b/core/tasks/device-tests.mk index a0662ca75..731937f2b 100644 --- a/core/tasks/device-tests.mk +++ b/core/tasks/device-tests.mk @@ -14,4 +14,14 @@ .PHONY: device-tests -device-tests: $(COMPATIBILITY.device-tests.FILES) + +device-tests-zip := $(PRODUCT_OUT)/device-tests.zip +$(device-tests-zip): $(COMPATIBILITY.device-tests.FILES) $(SOONG_ZIP) + echo $(COMPATIBILITY.device-tests.FILES) > $@.list + sed -i -e 's/\s\+/\n/g' $@.list + grep $(HOST_OUT_TESTCASES) $@.list > $@-host.list || true + grep $(TARGET_OUT_TESTCASES) $@.list > $@-target.list || true + $(hide) $(SOONG_ZIP) -d -o $@ -C $(HOST_OUT) -l $@-host.list -C $(PRODUCT_OUT) -l $@-target.list + +device-tests: $(device-tests-zip) +$(call dist-for-goals, device-tests, $(device-tests-zip)) diff --git a/core/tasks/general-tests.mk b/core/tasks/general-tests.mk index ddaede409..e02faa739 100644 --- a/core/tasks/general-tests.mk +++ b/core/tasks/general-tests.mk @@ -13,4 +13,14 @@ # limitations under the License. .PHONY: general-tests -device-tests: $(COMPATIBILITY.general-tests.FILES) + +general-tests-zip := $(PRODUCT_OUT)/general-tests.zip +$(general-tests-zip): $(COMPATIBILITY.general-tests.FILES) $(SOONG_ZIP) + echo $(COMPATIBILITY.general-tests.FILES) > $@.list + sed -i -e 's/\s\+/\n/g' $@.list + grep $(HOST_OUT_TESTCASES) $@.list > $@-host.list || true + grep $(TARGET_OUT_TESTCASES) $@.list > $@-target.list || true + $(hide) $(SOONG_ZIP) -d -o $@ -C $(HOST_OUT) -l $@-host.list -C $(PRODUCT_OUT) -l $@-target.list + +general-tests: $(general-tests-zip) +$(call dist-for-goals, general-tests, $(general-tests-zip))