Support per-testcase directories in all test suites
There are cases where two modules try to install the same test data
into CTS, which results in collisions when CTS puts the data for all
tests in the same directory. Add a flag that allows enabling a
per-testcase directory for an individual test for all test suites.
Bug: 193168159
Test: cts-tradefed run commandAndExit CtsBionicTestCases
Change-Id: I4bfaaedfe0e6b8df9c75125b3e2762a4f0d5b395
diff --git a/core/definitions.mk b/core/definitions.mk
index 981c6cb..c7172ca 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -2994,9 +2994,10 @@
# Can be passed a subdirectory to use for the common testcase directory.
define compatibility_suite_dirs
$(strip \
- $(if $(COMPATIBILITY_TESTCASES_OUT_INCLUDE_MODULE_FOLDER_$(1)),\
- $(COMPATIBILITY_TESTCASES_OUT_$(1))/$(LOCAL_MODULE)$(2),\
- $(COMPATIBILITY_TESTCASES_OUT_$(1))) \
+ $(if $(COMPATIBILITY_TESTCASES_OUT_$(1)), \
+ $(if $(COMPATIBILITY_TESTCASES_OUT_INCLUDE_MODULE_FOLDER_$(1))$(LOCAL_COMPATIBILITY_PER_TESTCASE_DIRECTORY),\
+ $(COMPATIBILITY_TESTCASES_OUT_$(1))/$(LOCAL_MODULE)$(2),\
+ $(COMPATIBILITY_TESTCASES_OUT_$(1)))) \
$($(my_prefix)OUT_TESTCASES)/$(LOCAL_MODULE)$(2))
endef