OSDN Git Service

bluetooth: Configure VTS to run the HAL gtest
authorMyles Watson <mylesgw@google.com>
Thu, 24 Nov 2016 00:51:17 +0000 (16:51 -0800)
committerMyles Watson <mylesgw@google.com>
Fri, 20 Jan 2017 00:34:05 +0000 (00:34 +0000)
Configure VTS to run target-side functional test

Test: run the test

Change-Id: I1d41113d422ca21ba539b43d22ae5e47facf5fcd

bluetooth/1.0/vts/Android.mk [new file with mode: 0644]
bluetooth/1.0/vts/BluetoothHci.vts [new file with mode: 0644]
bluetooth/1.0/vts/BluetoothHciCallbacks.vts [new file with mode: 0644]
bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/Android.mk [new file with mode: 0644]
bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target/Android.mk [new file with mode: 0644]
bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target/AndroidTest.xml [new file with mode: 0644]
bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target_profiling/Android.mk [new file with mode: 0644]
bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target_profiling/AndroidTest.xml [new file with mode: 0644]
bluetooth/1.0/vts/types.vts [new file with mode: 0644]

diff --git a/bluetooth/1.0/vts/Android.mk b/bluetooth/1.0/vts/Android.mk
new file mode 100644 (file)
index 0000000..85e0c38
--- /dev/null
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2016 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 $(LOCAL_PATH)/functional/vts/testcases/hal/bluetooth/hidl/Android.mk
diff --git a/bluetooth/1.0/vts/BluetoothHci.vts b/bluetooth/1.0/vts/BluetoothHci.vts
new file mode 100644 (file)
index 0000000..1112371
--- /dev/null
@@ -0,0 +1,61 @@
+component_class: HAL_HIDL
+component_type_version: 1.0
+component_name: "IBluetoothHci"
+
+package: "android.hardware.bluetooth"
+
+import: "android.hardware.bluetooth@1.0::IBluetoothHciCallbacks"
+import: "android.hardware.bluetooth@1.0::types"
+
+interface: {
+    api: {
+        name: "initialize"
+        return_type_hidl: {
+            type: TYPE_ENUM
+            predefined_type: "::android::hardware::bluetooth::V1_0::Status"
+        }
+        arg: {
+            type: TYPE_HIDL_INTERFACE
+            predefined_type: "IBluetoothHciCallbacks"
+            is_callback: false
+        }
+    }
+
+    api: {
+        name: "sendHciCommand"
+        arg: {
+            type: TYPE_VECTOR
+            vector_value: {
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    api: {
+        name: "sendAclData"
+        arg: {
+            type: TYPE_VECTOR
+            vector_value: {
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    api: {
+        name: "sendScoData"
+        arg: {
+            type: TYPE_VECTOR
+            vector_value: {
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    api: {
+        name: "close"
+    }
+
+}
diff --git a/bluetooth/1.0/vts/BluetoothHciCallbacks.vts b/bluetooth/1.0/vts/BluetoothHciCallbacks.vts
new file mode 100644 (file)
index 0000000..f2df5b4
--- /dev/null
@@ -0,0 +1,43 @@
+component_class: HAL_HIDL
+component_type_version: 1.0
+component_name: "IBluetoothHciCallbacks"
+
+package: "android.hardware.bluetooth"
+
+import: "android.hardware.bluetooth@1.0::types"
+
+interface: {
+    api: {
+        name: "hciEventReceived"
+        arg: {
+            type: TYPE_VECTOR
+            vector_value: {
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    api: {
+        name: "aclDataReceived"
+        arg: {
+            type: TYPE_VECTOR
+            vector_value: {
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    api: {
+        name: "scoDataReceived"
+        arg: {
+            type: TYPE_VECTOR
+            vector_value: {
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+}
diff --git a/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/Android.mk b/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/Android.mk
new file mode 100644 (file)
index 0000000..f9e3276
--- /dev/null
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2016 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 $(call all-subdir-makefiles)
diff --git a/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target/Android.mk b/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target/Android.mk
new file mode 100644 (file)
index 0000000..98bb686
--- /dev/null
@@ -0,0 +1,23 @@
+#
+# Copyright (C) 2016 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 := HalBluetoothHidlTargetBasicTest
+VTS_CONFIG_SRC_DIR := testcases/hal/bluetooth/hidl/target
+include test/vts/tools/build/Android.host_config.mk
diff --git a/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target/AndroidTest.xml b/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target/AndroidTest.xml
new file mode 100644 (file)
index 0000000..54fb89b
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 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 Bluetooth HIDL HAL's basic target-side test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="push-group" value="HidlHalTest.push" />
+    </target_preparer>
+    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="HalBluetoothHidlTargetBasicTest" />
+        <option name="binary-test-sources" value="
+            _64bit::DATA/nativetest64/bluetooth_hidl_hal_test/bluetooth_hidl_hal_test,
+            "/>
+        <option name="binary-test-type" value="gtest" />
+        <option name="test-timeout" value="1m" />
+    </test>
+</configuration>
diff --git a/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target_profiling/Android.mk b/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target_profiling/Android.mk
new file mode 100644 (file)
index 0000000..81a2db9
--- /dev/null
@@ -0,0 +1,23 @@
+#
+## Copyright (C) 2016 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 := BluetoothHidlTargetProfilingTest
+VTS_CONFIG_SRC_DIR := testcases/hal/bluetooth/hidl/target_profiling
+include test/vts/tools/build/Android.host_config.mk
diff --git a/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target_profiling/AndroidTest.xml b/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target_profiling/AndroidTest.xml
new file mode 100644 (file)
index 0000000..8052b3c
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 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 Bluetooth HIDL HAL's target-side profiling test cases">
+    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+        <option name="push-group" value="HidlHalTest.push" />
+    </target_preparer>
+    <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+    <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+        <option name="test-module-name" value="BluetoothHidlTargetProfilingTest" />
+        <option name="binary-test-sources" value="
+            _64bit::DATA/nativetest64/bluetooth_hidl_hal_test/bluetooth_hidl_hal_test,
+            "/>
+        <option name="binary-test-type" value="gtest" />
+        <option name="test-timeout" value="1m" />
+    <option name="enable-profiling" value="true" />
+    </test>
+</configuration>
diff --git a/bluetooth/1.0/vts/types.vts b/bluetooth/1.0/vts/types.vts
new file mode 100644 (file)
index 0000000..59eb3d4
--- /dev/null
@@ -0,0 +1,32 @@
+component_class: HAL_HIDL
+component_type_version: 1.0
+component_name: "types"
+
+package: "android.hardware.bluetooth"
+
+
+attribute: {
+    name: "::android::hardware::bluetooth::V1_0::Status"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "int32_t"
+
+        enumerator: "SUCCESS"
+        scalar_value: {
+            int32_t: 0
+        }
+        enumerator: "TRANSPORT_ERROR"
+        scalar_value: {
+            int32_t: 1
+        }
+        enumerator: "INITIALIZATION_ERROR"
+        scalar_value: {
+            int32_t: 2
+        }
+        enumerator: "UNKNOWN"
+        scalar_value: {
+            int32_t: 3
+        }
+    }
+}
+