bluetooth: Configure VTS to run the HAL gtest

Configure VTS to run target-side functional test

Test: run the test

Change-Id: I1d41113d422ca21ba539b43d22ae5e47facf5fcd
This commit is contained in:
Myles Watson
2016-11-23 16:51:17 -08:00
parent 5c959c69dc
commit 960cae2e98
9 changed files with 279 additions and 0 deletions

View File

@@ -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

View File

@@ -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"
}
}

View File

@@ -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"
}
}
}
}

View File

@@ -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)

View File

@@ -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

View File

@@ -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>

View File

@@ -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

View File

@@ -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>

View File

@@ -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
}
}
}