Merge "Add health storage HAL test configs"
diff --git a/health/storage/V1_0/build/Android.bp b/health/storage/V1_0/build/Android.bp
new file mode 100644
index 0000000..a4f2e04
--- /dev/null
+++ b/health/storage/V1_0/build/Android.bp
@@ -0,0 +1,99 @@
+// This file was auto-generated. Do not edit manually.
+// Use launch_hal_test.py or update_makefiles.py in test/vts-testcase/hal/script/ to generate this file.
+
+// Generate .vts spec files.
+hal2vts {
+    name: "android.hardware.health.storage@1.0-vts.spec",
+    hidl_gen_args: "-r android.hardware:hardware/interfaces",
+    srcs: [
+        ":android.hardware.health.storage@1.0_hal",
+    ],
+    out: [
+        "android/hardware/health/storage/1.0/GarbageCollectCallback.vts",
+        "android/hardware/health/storage/1.0/Storage.vts",
+        "android/hardware/health/storage/1.0/types.vts",
+    ],
+}
+
+// Build VTS driver.
+genrule {
+    name: "android.hardware.health.storage@1.0-vts.driver_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.health.storage@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/health/storage/1.0/ $(genDir)/android/hardware/health/storage/1.0/",
+    srcs: [
+        ":android.hardware.health.storage@1.0_hal",
+    ],
+    out: [
+        "android/hardware/health/storage/1.0/GarbageCollectCallback.vts.cpp",
+        "android/hardware/health/storage/1.0/Storage.vts.cpp",
+        "android/hardware/health/storage/1.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.health.storage@1.0-vts.driver_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.health.storage@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/health/storage/1.0/ $(genDir)/android/hardware/health/storage/1.0/",
+    srcs: [
+        ":android.hardware.health.storage@1.0_hal",
+    ],
+    out: [
+        "android/hardware/health/storage/1.0/GarbageCollectCallback.vts.h",
+        "android/hardware/health/storage/1.0/Storage.vts.h",
+        "android/hardware/health/storage/1.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.health.storage@1.0-vts.driver",
+    generated_sources: ["android.hardware.health.storage@1.0-vts.driver_genc++"],
+    generated_headers: ["android.hardware.health.storage@1.0-vts.driver_genc++_headers"],
+    export_generated_headers: ["android.hardware.health.storage@1.0-vts.driver_genc++_headers"],
+    defaults: ["VtsHalDriverDefaults"],
+    shared_libs: [],
+    static_libs: [
+        "android.hardware.health.storage@1.0",
+    ],
+}
+
+// Build VTS profiler.
+genrule {
+    name: "android.hardware.health.storage@1.0-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.health.storage@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/health/storage/1.0/ $(genDir)/android/hardware/health/storage/1.0/",
+    srcs: [
+        ":android.hardware.health.storage@1.0_hal",
+    ],
+    out: [
+        "android/hardware/health/storage/1.0/GarbageCollectCallback.vts.cpp",
+        "android/hardware/health/storage/1.0/Storage.vts.cpp",
+        "android/hardware/health/storage/1.0/types.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.health.storage@1.0-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -r android.hardware:hardware/interfaces android.hardware.health.storage@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/health/storage/1.0/ $(genDir)/android/hardware/health/storage/1.0/",
+    srcs: [
+        ":android.hardware.health.storage@1.0_hal",
+    ],
+    out: [
+        "android/hardware/health/storage/1.0/GarbageCollectCallback.vts.h",
+        "android/hardware/health/storage/1.0/Storage.vts.h",
+        "android/hardware/health/storage/1.0/types.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.health.storage@1.0-vts.profiler",
+    generated_sources: ["android.hardware.health.storage@1.0-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.health.storage@1.0-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.health.storage@1.0-vts.profiler_genc++_headers"],
+    defaults: ["VtsHalProfilerDefaults"],
+    shared_libs: [],
+    static_libs: [
+        "android.hardware.health.storage@1.0",
+    ],
+}
+
diff --git a/health/storage/V1_0/target/Android.mk b/health/storage/V1_0/target/Android.mk
new file mode 100644
index 0000000..08ba4a3
--- /dev/null
+++ b/health/storage/V1_0/target/Android.mk
@@ -0,0 +1,22 @@
+#
+# 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := VtsHalHealthStorageV1_0Target
+include test/vts/tools/build/Android.host_config.mk
diff --git a/health/storage/V1_0/target/AndroidTest.xml b/health/storage/V1_0/target/AndroidTest.xml
new file mode 100644
index 0000000..61325ea
--- /dev/null
+++ b/health/storage/V1_0/target/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?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 VTS VtsHalHealthStorageV1_0Target test cases">
+    <option name="config-descriptor:metadata" key="plan" value="vts-hal" />
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="abort-on-push-failure" value="false"/>
+        <option name="push-group" value="HalHidlTargetTest.push"/>
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="VtsHalHealthStorageV1_0Target"/>
+        <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalHealthStorageV1_0TargetTest/VtsHalHealthStorageV1_0TargetTest"/>
+        <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalHealthStorageV1_0TargetTest/VtsHalHealthStorageV1_0TargetTest"/>
+        <option name="binary-test-type" value="hal_hidl_gtest"/>
+        <option name="test-timeout" value="5m"/>
+    </test>
+</configuration>