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
This commit is contained in:
Colin Cross
2021-09-24 15:47:44 -07:00
parent b9306ac477
commit f4017412e2
2 changed files with 5 additions and 3 deletions

View File

@@ -42,6 +42,7 @@ LOCAL_CLANG_CPPFLAGS:=
LOCAL_CLANG_LDFLAGS:=
LOCAL_CLASSPATH:=
LOCAL_COMPATIBILITY_SUITE:=
LOCAL_COMPATIBILITY_PER_TESTCASE_DIRECTORY:=
LOCAL_COMPATIBILITY_SUPPORT_FILES:=
LOCAL_COMPRESSED_MODULE:=
LOCAL_CONLYFLAGS:=

View File

@@ -2994,9 +2994,10 @@ endef
# 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