Fix test configs for libvintf_test and vintf_object_test

The two tests need to use different test configs and they should be
limited to Android target, so the host config can be auto generated.

Bug: 121322618
Test: m -j libvintf_test vintf_object_test
atest libvintf_test
atest libvintf_test --host
atest vintf_object_test
atest vintf_object_test --host

Change-Id: Iae8068f4aac015f65e9d3bf43ff80eaa07731949
diff --git a/TEST_MAPPING b/TEST_MAPPING
index c694b80..34276ed 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -1,16 +1,14 @@
 {
   "presubmit": [
     {
-      "name": "libvintf_test",
-      "host": false
+      "name": "libvintf_test"
     },
     {
       "name": "libvintf_test",
       "host": true
     },
     {
-      "name": "vintf_object_test",
-      "host": false
+      "name": "vintf_object_test"
     },
     {
       "name": "vintf_object_test",
diff --git a/test/Android.bp b/test/Android.bp
index 36cfe83..837bdff 100644
--- a/test/Android.bp
+++ b/test/Android.bp
@@ -42,6 +42,7 @@
     target: {
         android: {
             cflags: ["-DLIBVINTF_TARGET"],
+            test_config: "libvintf_test.xml",
         },
     },
 
@@ -82,6 +83,7 @@
     target: {
         android: {
             cflags: ["-DLIBVINTF_TARGET"],
+            test_config: "vintf_object_test.xml",
         },
     },
 
diff --git a/test/libvintf_test.xml b/test/libvintf_test.xml
new file mode 100644
index 0000000..2f21c30
--- /dev/null
+++ b/test/libvintf_test.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 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="Config for libvintf_test">
+    <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
+        <option name="cleanup" value="true" />
+        <option name="push" value="libvintf_test->/data/local/tmp/libvintf_test" />
+    </target_preparer>
+    <option name="test-suite-tag" value="apct" />
+    <test class="com.android.tradefed.testtype.GTest" >
+        <option name="native-test-device-path" value="/data/local/tmp" />
+        <option name="module-name" value="libvintf_test" />
+    </test>
+</configuration>
diff --git a/test/AndroidTest.xml b/test/vintf_object_test.xml
similarity index 100%
rename from test/AndroidTest.xml
rename to test/vintf_object_test.xml