Add lib dirs to cts distribution.

Add ability to include dirs to the cts distribtion to enable bundling of shared
libraries on which host-side executables rely.

Bug: 19566396
Change-Id: Id501874244ae98fbfef2aa591885c88dee5b8b02
diff --git a/core/tasks/ b/core/tasks/
index ee17444..23648f8 100644
--- a/core/tasks/
+++ b/core/tasks/
@@ -65,7 +65,7 @@
         cts-junit \
-	CtsJdwp
+        CtsJdwp
 # Depend on the full package paths rather than the phony targets to avoid
 # rebuilding the packages every time.
@@ -86,8 +86,11 @@
     $(eval $(call copy-one-file, $(built), $(installed)))\
     $(eval CTS_CASE_LIST_APKS += $(installed))))
 DEFAULT_TEST_PLAN := $(cts_dir)/$(cts_name)/resource/plans
 # Make necessary directory for CTS
 	$(hide) mkdir -p $(TMP_DIR)
 	$(hide) mkdir -p $(PRIVATE_DIR)/docs
@@ -97,6 +100,7 @@
 # Copy executable and JARs to CTS directory
 	$(hide) $(ACP) -fp $(VMTESTSTF_JAR) $(PRIVATE_DIR)/repository/testcases
+	$(hide) $(call copy-files-with-structure, $(CTS_SHARED_LIBS),$(HOST_OUT)/,$(PRIVATE_DIR))
 # Change mode of the executables
 	$(foreach jar,$(CTS_TEST_JAR_LIST),$(call copy-testcase-jar,$(jar)))
 	$(foreach testcase,$(CTS_TEST_CASES),$(call copy-testcase,$(testcase)))