Change CTS makefiles so apps are built in data not system partition.

BUG 2053298

Change-Id: I2c541c03f7c33c69cde7b0567b080710658c8d28
diff --git a/tests/ApiDemosReferenceTest/Android.mk b/tests/ApiDemosReferenceTest/Android.mk
index ee97b30..315ecd6 100644
--- a/tests/ApiDemosReferenceTest/Android.mk
+++ b/tests/ApiDemosReferenceTest/Android.mk
@@ -15,7 +15,10 @@
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_SRC_FILES := $(call all-subdir-java-files)
 
diff --git a/tests/ProcessTest/Android.mk b/tests/ProcessTest/Android.mk
index 8da017a..be1e7de 100644
--- a/tests/ProcessTest/Android.mk
+++ b/tests/ProcessTest/Android.mk
@@ -15,7 +15,11 @@
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+
 LOCAL_JAVA_LIBRARIES := framework-tests android.test.runner
 
 LOCAL_AAPT_FLAGS = -c xx_YY -c cs
diff --git a/tests/ProcessTest/NoShareUidApp/Android.mk b/tests/ProcessTest/NoShareUidApp/Android.mk
index 87d33a7..dc64a76 100644
--- a/tests/ProcessTest/NoShareUidApp/Android.mk
+++ b/tests/ProcessTest/NoShareUidApp/Android.mk
@@ -16,7 +16,10 @@
 
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_SRC_FILES := $(call all-subdir-java-files)
 
diff --git a/tests/ProcessTest/ShareUidApp/Android.mk b/tests/ProcessTest/ShareUidApp/Android.mk
index 8a7ccac..43b2a87 100644
--- a/tests/ProcessTest/ShareUidApp/Android.mk
+++ b/tests/ProcessTest/ShareUidApp/Android.mk
@@ -16,7 +16,10 @@
 
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_SRC_FILES := $(call all-subdir-java-files)
 
diff --git a/tests/SignatureTest/Android.mk b/tests/SignatureTest/Android.mk
index b846ff7..39884c8 100644
--- a/tests/SignatureTest/Android.mk
+++ b/tests/SignatureTest/Android.mk
@@ -15,7 +15,10 @@
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_SRC_FILES := $(call all-subdir-java-files)
 
diff --git a/tests/SignatureTest/tests/Android.mk b/tests/SignatureTest/tests/Android.mk
index d33e827..adc40a9 100644
--- a/tests/SignatureTest/tests/Android.mk
+++ b/tests/SignatureTest/tests/Android.mk
@@ -1,7 +1,10 @@
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_JAVA_LIBRARIES := android.test.runner
 
diff --git a/tests/core/concurrent/Android.mk b/tests/core/concurrent/Android.mk
index 0f33254..d42c6da 100644
--- a/tests/core/concurrent/Android.mk
+++ b/tests/core/concurrent/Android.mk
@@ -23,7 +23,10 @@
 ##########################################################
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_SRC_FILES := $(call all-java-files-under,../../../../dalvik/libcore/concurrent/src/test/java) \
 	$(call all-java-files-under,../../../../dalvik/libcore/luni/src/test/java/junit) \
diff --git a/tests/core/ctscore.mk b/tests/core/ctscore.mk
index 4397610..7c29535 100644
--- a/tests/core/ctscore.mk
+++ b/tests/core/ctscore.mk
@@ -12,7 +12,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+# don't include these packages in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put them in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_JAVA_LIBRARIES := android.test.runner
 
diff --git a/tests/core/runner/Android.mk b/tests/core/runner/Android.mk
index 2e85db8..f77bbc7 100644
--- a/tests/core/runner/Android.mk
+++ b/tests/core/runner/Android.mk
@@ -23,6 +23,7 @@
 ##########################################################
 include $(CLEAR_VARS)
 
+# include this package in the tests target for continuous testing
 LOCAL_MODULE_TAGS := tests
 
 LOCAL_SRC_FILES := $(call all-java-files-under,src)
diff --git a/tests/tests/app/Android.mk b/tests/tests/app/Android.mk
index 61803db..4643b4c 100644
--- a/tests/tests/app/Android.mk
+++ b/tests/tests/app/Android.mk
@@ -16,7 +16,10 @@
 
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_JAVA_LIBRARIES := android.test.runner
 
diff --git a/tests/tests/content/Android.mk b/tests/tests/content/Android.mk
index 7a3dce6..a2f0e0f 100644
--- a/tests/tests/content/Android.mk
+++ b/tests/tests/content/Android.mk
@@ -16,7 +16,10 @@
 
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_JAVA_LIBRARIES := android.test.runner
 
diff --git a/tests/tests/database/Android.mk b/tests/tests/database/Android.mk
index e10174c..fd3c79b 100644
--- a/tests/tests/database/Android.mk
+++ b/tests/tests/database/Android.mk
@@ -16,7 +16,10 @@
 
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_JAVA_LIBRARIES := android.test.runner
 
diff --git a/tests/tests/dpi/Android.mk b/tests/tests/dpi/Android.mk
index e104290..70edf13 100644
--- a/tests/tests/dpi/Android.mk
+++ b/tests/tests/dpi/Android.mk
@@ -23,7 +23,10 @@
 
 LOCAL_PACKAGE_NAME := CtsDpiTestCases
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_SDK_VERSION := current
 
diff --git a/tests/tests/gesture/Android.mk b/tests/tests/gesture/Android.mk
index e328e9f..22aeaec 100755
--- a/tests/tests/gesture/Android.mk
+++ b/tests/tests/gesture/Android.mk
@@ -16,7 +16,10 @@
 
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_JAVA_LIBRARIES := android.test.runner
 
diff --git a/tests/tests/graphics/Android.mk b/tests/tests/graphics/Android.mk
index bacf455..bbee4af 100644
--- a/tests/tests/graphics/Android.mk
+++ b/tests/tests/graphics/Android.mk
@@ -16,7 +16,10 @@
 
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_JAVA_LIBRARIES := android.test.runner
 
diff --git a/tests/tests/hardware/Android.mk b/tests/tests/hardware/Android.mk
index 9713d0a..91be886 100644
--- a/tests/tests/hardware/Android.mk
+++ b/tests/tests/hardware/Android.mk
@@ -16,7 +16,10 @@
 
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_JAVA_LIBRARIES := android.test.runner
 
diff --git a/tests/tests/location/Android.mk b/tests/tests/location/Android.mk
index 24d9e5d..3deb1b0 100644
--- a/tests/tests/location/Android.mk
+++ b/tests/tests/location/Android.mk
@@ -16,7 +16,10 @@
 
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_JAVA_LIBRARIES := android.test.runner
 
diff --git a/tests/tests/media/Android.mk b/tests/tests/media/Android.mk
index 2c4ade1..5d8d37b 100644
--- a/tests/tests/media/Android.mk
+++ b/tests/tests/media/Android.mk
@@ -16,7 +16,10 @@
 
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_JAVA_LIBRARIES := android.test.runner
 
diff --git a/tests/tests/net/Android.mk b/tests/tests/net/Android.mk
index 26188af..d23cee8 100644
--- a/tests/tests/net/Android.mk
+++ b/tests/tests/net/Android.mk
@@ -16,7 +16,10 @@
 
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_JAVA_LIBRARIES := android.test.runner
 
diff --git a/tests/tests/os/Android.mk b/tests/tests/os/Android.mk
index 90f0860..6a89ab4 100644
--- a/tests/tests/os/Android.mk
+++ b/tests/tests/os/Android.mk
@@ -16,7 +16,10 @@
 
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_JAVA_LIBRARIES := android.test.runner
 
diff --git a/tests/tests/performance/Android.mk b/tests/tests/performance/Android.mk
index 7624014..6025c7f 100644
--- a/tests/tests/performance/Android.mk
+++ b/tests/tests/performance/Android.mk
@@ -16,7 +16,10 @@
 
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_JAVA_LIBRARIES := android.test.runner
 
diff --git a/tests/tests/performance2/Android.mk b/tests/tests/performance2/Android.mk
index 2b308ca..9264559 100644
--- a/tests/tests/performance2/Android.mk
+++ b/tests/tests/performance2/Android.mk
@@ -16,7 +16,10 @@
 
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_JAVA_LIBRARIES := android.test.runner
 
diff --git a/tests/tests/performance3/Android.mk b/tests/tests/performance3/Android.mk
index 75e9e82..d24d2bd 100644
--- a/tests/tests/performance3/Android.mk
+++ b/tests/tests/performance3/Android.mk
@@ -16,7 +16,10 @@
 
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_JAVA_LIBRARIES := android.test.runner
 
diff --git a/tests/tests/performance4/Android.mk b/tests/tests/performance4/Android.mk
index 9cd937f..8aabbfb 100644
--- a/tests/tests/performance4/Android.mk
+++ b/tests/tests/performance4/Android.mk
@@ -16,7 +16,10 @@
 
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_JAVA_LIBRARIES := android.test.runner
 
diff --git a/tests/tests/performance5/Android.mk b/tests/tests/performance5/Android.mk
index ce6f5fa..c1f91fd 100644
--- a/tests/tests/performance5/Android.mk
+++ b/tests/tests/performance5/Android.mk
@@ -16,7 +16,10 @@
 
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_JAVA_LIBRARIES := android.test.runner
 
diff --git a/tests/tests/provider/Android.mk b/tests/tests/provider/Android.mk
index c2674dd..c33d98a 100644
--- a/tests/tests/provider/Android.mk
+++ b/tests/tests/provider/Android.mk
@@ -16,7 +16,10 @@
 
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_JAVA_LIBRARIES := android.test.runner
 
diff --git a/tests/tests/telephony/Android.mk b/tests/tests/telephony/Android.mk
index 72f150d..90027b0 100644
--- a/tests/tests/telephony/Android.mk
+++ b/tests/tests/telephony/Android.mk
@@ -17,7 +17,10 @@
 
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_JAVA_LIBRARIES := android.test.runner
 
diff --git a/tests/tests/text/Android.mk b/tests/tests/text/Android.mk
index 7c6ec47..aa7db3c 100644
--- a/tests/tests/text/Android.mk
+++ b/tests/tests/text/Android.mk
@@ -16,7 +16,10 @@
 
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_JAVA_LIBRARIES := android.test.runner
 
diff --git a/tests/tests/util/Android.mk b/tests/tests/util/Android.mk
index d666336..bc9b24b 100644
--- a/tests/tests/util/Android.mk
+++ b/tests/tests/util/Android.mk
@@ -16,7 +16,10 @@
 
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_JAVA_LIBRARIES := android.test.runner
 
diff --git a/tests/tests/view/Android.mk b/tests/tests/view/Android.mk
index de572b4..037ae9a 100644
--- a/tests/tests/view/Android.mk
+++ b/tests/tests/view/Android.mk
@@ -16,7 +16,10 @@
 
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_JAVA_LIBRARIES := android.test.runner
 
diff --git a/tests/tests/webkit/Android.mk b/tests/tests/webkit/Android.mk
index 9e4b6ad..c96d6e1 100644
--- a/tests/tests/webkit/Android.mk
+++ b/tests/tests/webkit/Android.mk
@@ -16,7 +16,10 @@
 
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_JAVA_LIBRARIES := android.test.runner
 
diff --git a/tests/tests/widget/Android.mk b/tests/tests/widget/Android.mk
index b5cf1e8..74b8915 100644
--- a/tests/tests/widget/Android.mk
+++ b/tests/tests/widget/Android.mk
@@ -16,7 +16,10 @@
 
 include $(CLEAR_VARS)
 
+# don't include this package in any target
 LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
 
 LOCAL_JAVA_LIBRARIES := android.test.runner