From 26b9e3ba31b04ba91d851487ecde36c62134a823 Mon Sep 17 00:00:00 2001 From: Yuntao Xu Date: Tue, 7 Sep 2021 16:46:37 -0700 Subject: [PATCH] Add android-cts-verifier.zip Adding android-cts-verifier.zip to $(HOST_OUT)/cts-verifier at build/make/core/tasks/cts.mk. Bug: 190635892 Test: m cts Test: TreeHugger Change-Id: I63b2da75391221119025b597257c26906718cf77 Merged-In: I63b2da75391221119025b597257c26906718cf77 --- core/tasks/cts.mk | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/core/tasks/cts.mk b/core/tasks/cts.mk index dccf14f72b..966ceb7ba4 100644 --- a/core/tasks/cts.mk +++ b/core/tasks/cts.mk @@ -57,3 +57,25 @@ ifneq (,$(wildcard cts/)) $(error $(error_msg)) endif endif + +# Creates a "cts-verifier" directory that will contain: +# +# 1. Out directory with a "android-cts-verifier" containing the CTS Verifier +# and other binaries it needs. +# +# 2. Zipped version of the android-cts-verifier directory to be included with +# the build distribution. +## +cts-dir := $(HOST_OUT)/cts-verifier +verifier-dir-name := android-cts-verifier +verifier-dir := $(cts-dir)/$(verifier-dir-name) +verifier-zip-name := $(verifier-dir-name).zip +verifier-zip := $(cts-dir)/$(verifier-zip-name) + +cts : $(verifier-zip) +$(verifier-zip): PRIVATE_DIR := $(cts-dir) +$(verifier-zip): $(SOONG_ANDROID_CTS_VERIFIER_ZIP) + rm -rf $(PRIVATE_DIR) + mkdir -p $(PRIVATE_DIR) + unzip -q -d $(PRIVATE_DIR) $< + $(copy-file-to-target)