From: Myles Watson Date: Thu, 24 Nov 2016 00:51:17 +0000 (-0800) Subject: bluetooth: Configure VTS to run the HAL gtest X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=960cae2e98baad428fc21d759fd2114d7333cc1f;p=android-x86%2Fhardware-interfaces.git bluetooth: Configure VTS to run the HAL gtest Configure VTS to run target-side functional test Test: run the test Change-Id: I1d41113d422ca21ba539b43d22ae5e47facf5fcd --- diff --git a/bluetooth/1.0/vts/Android.mk b/bluetooth/1.0/vts/Android.mk new file mode 100644 index 00000000..85e0c380 --- /dev/null +++ b/bluetooth/1.0/vts/Android.mk @@ -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 index 00000000..11123716 --- /dev/null +++ b/bluetooth/1.0/vts/BluetoothHci.vts @@ -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 index 00000000..f2df5b4c --- /dev/null +++ b/bluetooth/1.0/vts/BluetoothHciCallbacks.vts @@ -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 index 00000000..f9e32763 --- /dev/null +++ b/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/Android.mk @@ -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 index 00000000..98bb686c --- /dev/null +++ b/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target/Android.mk @@ -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 index 00000000..54fb89b4 --- /dev/null +++ b/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target/AndroidTest.xml @@ -0,0 +1,29 @@ + + + + + + + + + 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 index 00000000..81a2db9f --- /dev/null +++ b/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target_profiling/Android.mk @@ -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 index 00000000..8052b3c7 --- /dev/null +++ b/bluetooth/1.0/vts/functional/vts/testcases/hal/bluetooth/hidl/target_profiling/AndroidTest.xml @@ -0,0 +1,30 @@ + + + + + + + + + diff --git a/bluetooth/1.0/vts/types.vts b/bluetooth/1.0/vts/types.vts new file mode 100644 index 00000000..59eb3d49 --- /dev/null +++ b/bluetooth/1.0/vts/types.vts @@ -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 + } + } +} +