Output *TS testcases to common testcase folders.
Aggregates the different *TS testcases into two common folders,
one under each the host and product hierarchies.
Bug: 34715822
Test: `make cts -j` and checked the contents of both:
out/host/linux-x86/testcases/ &
out/host/linux-x86/cts/android-cts/testcases/
Change-Id: I7d5201998ddcb011ecc687c272a0d0a36da248b7
diff --git a/core/package_internal.mk b/core/package_internal.mk
index 5dd021c..f5f5861 100644
--- a/core/package_internal.mk
+++ b/core/package_internal.mk
@@ -585,12 +585,15 @@
cts_testcase_file := $(foreach s,$(my_split_suffixes),$(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(LOCAL_MODULE)_$(s).apk)
$(cts_testcase_file) : $(COMPATIBILITY_TESTCASES_OUT_$(LOCAL_COMPATIBILITY_SUITE))/$(LOCAL_MODULE)_%.apk : $(built_module_path)/package_%.apk | $(ACP)
$(copy-file-to-new-target)
+common_testcase_file := $(foreach s,$(my_split_suffixes),$($(my_prefix)OUT_TESTCASES)/$(LOCAL_MODULE)_$(s).apk)
+$(common_testcase_file) : $($(my_prefix)OUT_TESTCASES)/$(LOCAL_MODULE)_%.apk : $(built_module_path)/package_%.apk
+ $(copy-file-to-new-target)
COMPATIBILITY.$(LOCAL_COMPATIBILITY_SUITE).FILES := \
$(COMPATIBILITY.$(LOCAL_COMPATIBILITY_SUITE).FILES) \
- $(cts_testcase_file)
+ $(cts_testcase_file) $(common_testcase_file)
-$(my_all_targets) : $(cts_testcase_file)
+$(my_all_targets) : $(cts_testcase_file) $(common_testcase_file)
endif # LOCAL_COMPATIBILITY_SUITE
endif # LOCAL_PACKAGE_SPLITS