From c4cf49569f38c44e305df57024d5be20088ad123 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Fri, 10 Mar 2017 13:39:26 -0800 Subject: [PATCH] Speed up *TS zip file creation This also makes the resulting zip files more repeatable -- the file list is sorted and the entries have static timestamps. On my machine, this saves ~30 seconds for android-cts.zip, it now takes less than a second. Test: m -j cts; compare output from without this change Change-Id: Ia71e35878ff98ba9775115860530e87eee47739f --- core/tasks/tools/compatibility.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/tasks/tools/compatibility.mk b/core/tasks/tools/compatibility.mk index d8f900e4eb..1455a442ee 100644 --- a/core/tasks/tools/compatibility.mk +++ b/core/tasks/tools/compatibility.mk @@ -37,13 +37,14 @@ $(compatibility_zip): PRIVATE_OUT_DIR := $(out_dir) $(compatibility_zip): PRIVATE_TOOLS := $(test_tools) $(compatibility_zip): PRIVATE_SUITE_NAME := $(test_suite_name) $(compatibility_zip): PRIVATE_DYNAMIC_CONFIG := $(test_suite_dynamic_config) -$(compatibility_zip): $(test_artifacts) $(test_tools) $(test_suite_dynamic_config) | $(ADB) $(ACP) +$(compatibility_zip): $(test_artifacts) $(test_tools) $(test_suite_dynamic_config) $(SOONG_ZIP) | $(ADB) $(ACP) # Make dir structure $(hide) mkdir -p $(PRIVATE_OUT_DIR)/tools $(PRIVATE_OUT_DIR)/testcases # Copy tools $(hide) $(ACP) -fp $(PRIVATE_TOOLS) $(PRIVATE_OUT_DIR)/tools $(if $(PRIVATE_DYNAMIC_CONFIG),$(hide) $(ACP) -fp $(PRIVATE_DYNAMIC_CONFIG) $(PRIVATE_OUT_DIR)/testcases/$(PRIVATE_SUITE_NAME).dynamic) - $(hide) cd $(dir $@) && zip -rq $(notdir $@) $(PRIVATE_NAME) + $(hide) find $(dir $@)/$(PRIVATE_NAME) | sort >$@.list + $(hide) $(SOONG_ZIP) -d -o $@ -C $(dir $@) -l $@.list # Reset all input variables test_suite_name :=