Migrate Voice Interaction Tests to CTSv2

Bug: 21762834
Change-Id: I5538749735b6a6ab6075f27ead93ca3ec5f02ec3
diff --git a/tests/tests/voiceinteraction/Android.mk b/tests/tests/voiceinteraction/Android.mk
index b8f95e3..2d0666f 100644
--- a/tests/tests/voiceinteraction/Android.mk
+++ b/tests/tests/voiceinteraction/Android.mk
@@ -27,6 +27,11 @@
 
 LOCAL_PACKAGE_NAME := CtsVoiceInteractionTestCases
 
+# Tag this module as a cts_v2 test artifact
+LOCAL_COMPATIBILITY_SUITE := cts_v2
+
+LOCAL_CTS_MODULE_CONFIG := $(LOCAL_PATH)/Old$(CTS_MODULE_TEST_CONFIG)
+
 LOCAL_SDK_VERSION := current
 
 include $(BUILD_CTS_PACKAGE)
diff --git a/tests/tests/voiceinteraction/AndroidTest.xml b/tests/tests/voiceinteraction/AndroidTest.xml
index fa1ab70..c355341 100644
--- a/tests/tests/voiceinteraction/AndroidTest.xml
+++ b/tests/tests/voiceinteraction/AndroidTest.xml
@@ -13,11 +13,13 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Test module config for VoiceInteraction">
+<configuration description="Configuration for Voice Interaction Tests">
     <include name="common-config" />
-    <option name="cts-apk-installer:test-file-name" value="CtsVoiceInteractionService.apk" />
-    <option name="cts-apk-installer:test-file-name" value="CtsVoiceInteractionApp.apk" />
-    <option name="run-command:run-command"
-         value="settings put secure voice_interaction_service android.voiceinteraction.service/.MainInteractionService" />
-    <option name="cts-apk-installer:test-file-name" value="CtsVoiceInteractionTestCases.apk" />
+    <option name="apk-installer:test-file-name" value="CtsVoiceInteractionService.apk" />
+    <option name="apk-installer:test-file-name" value="CtsVoiceInteractionApp.apk" />
+    <option name="apk-installer:test-file-name" value="CtsVoiceInteractionTestCases.apk" />
+    <test class="com.android.tradefed.testtype.InstrumentationTest" >
+        <option name="package" value="android.voiceinteraction.cts" />
+        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
+    </test>
 </configuration>
diff --git a/tests/tests/voiceinteraction/OldAndroidTest.xml b/tests/tests/voiceinteraction/OldAndroidTest.xml
new file mode 100644
index 0000000..fa1ab70
--- /dev/null
+++ b/tests/tests/voiceinteraction/OldAndroidTest.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<configuration description="Test module config for VoiceInteraction">
+    <include name="common-config" />
+    <option name="cts-apk-installer:test-file-name" value="CtsVoiceInteractionService.apk" />
+    <option name="cts-apk-installer:test-file-name" value="CtsVoiceInteractionApp.apk" />
+    <option name="run-command:run-command"
+         value="settings put secure voice_interaction_service android.voiceinteraction.service/.MainInteractionService" />
+    <option name="cts-apk-installer:test-file-name" value="CtsVoiceInteractionTestCases.apk" />
+</configuration>
diff --git a/tests/tests/voiceinteraction/service/Android.mk b/tests/tests/voiceinteraction/service/Android.mk
index 4338f13..705ef5b 100644
--- a/tests/tests/voiceinteraction/service/Android.mk
+++ b/tests/tests/voiceinteraction/service/Android.mk
@@ -27,6 +27,9 @@
 
 LOCAL_PACKAGE_NAME := CtsVoiceInteractionService
 
+# Tag this module as a cts_v2 test artifact
+LOCAL_COMPATIBILITY_SUITE := cts_v2
+
 LOCAL_SDK_VERSION := current
 
 include $(BUILD_CTS_SUPPORT_PACKAGE)
diff --git a/tests/tests/voiceinteraction/testapp/Android.mk b/tests/tests/voiceinteraction/testapp/Android.mk
index 7453880..ae42d34 100644
--- a/tests/tests/voiceinteraction/testapp/Android.mk
+++ b/tests/tests/voiceinteraction/testapp/Android.mk
@@ -29,4 +29,7 @@
 
 LOCAL_SDK_VERSION := current
 
+# Tag this module as a cts_v2 test artifact
+LOCAL_COMPATIBILITY_SUITE := cts_v2
+
 include $(BUILD_CTS_SUPPORT_PACKAGE)