Test: ENABLE_TREBLE=true make vts BUILD_GOOGLE_VTS=true -j32 && vts-tradefed run commandAndExit vts --skip-all-system-status-check --primary-abi-only --skip-preconditions --module VibratorHidlTest -l INFO
Change-Id: I32d41faf70b12c6248f274d1910f843e7b00c41f
"android.hidl.base@1.0",
],
}
+
+genrule {
+ name: "android.hardware.tv.input.vts.driver@1.0_genc++",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tv.input@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/tv/input/1.0/ $(genDir)/android/hardware/tv/input/1.0/",
+ srcs: [
+ "types.hal",
+ "ITvInput.hal",
+ "ITvInputCallback.hal",
+ ],
+ out: [
+ "android/hardware/tv/input/1.0/types.vts.cpp",
+ "android/hardware/tv/input/1.0/TvInput.vts.cpp",
+ "android/hardware/tv/input/1.0/TvInputCallback.vts.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.tv.input.vts.driver@1.0_genc++_headers",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tv.input@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/tv/input/1.0/ $(genDir)/android/hardware/tv/input/1.0/",
+ srcs: [
+ "types.hal",
+ "ITvInput.hal",
+ "ITvInputCallback.hal",
+ ],
+ out: [
+ "android/hardware/tv/input/1.0/types.vts.h",
+ "android/hardware/tv/input/1.0/TvInput.vts.h",
+ "android/hardware/tv/input/1.0/TvInputCallback.vts.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.tv.input.vts.driver@1.0",
+ generated_sources: ["android.hardware.tv.input.vts.driver@1.0_genc++"],
+ generated_headers: ["android.hardware.tv.input.vts.driver@1.0_genc++_headers"],
+ export_generated_headers: ["android.hardware.tv.input.vts.driver@1.0_genc++_headers"],
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ "libcutils",
+ "libvts_common",
+ "libvts_datatype",
+ "libvts_measurement",
+ "libvts_multidevice_proto",
+ "libcamera_metadata",
+ "libprotobuf-cpp-full",
+ "android.hardware.audio.common@2.0",
+ "android.hidl.base@1.0",
+ "android.hardware.tv.input@1.0",
+ ],
+ export_shared_lib_headers: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ "android.hardware.audio.common@2.0",
+ "android.hidl.base@1.0",
+ ],
+}
--- /dev/null
+#
+# 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)
LOCAL_PATH := $(call my-dir)
-# build VTS profiler for TvInput
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := libvts_profiler_hidl_tv_input@1.0
-
-LOCAL_SRC_FILES := \
- TvInput.vts \
- types.vts \
- ../../../../audio/common/2.0/vts/types.vts \
-
-LOCAL_C_INCLUDES += \
- test/vts/drivers/libprofiling \
-
-LOCAL_VTS_MODE := PROFILER
-
-LOCAL_SHARED_LIBRARIES += \
- android.hardware.tv.input@1.0 \
- libbase \
- libcutils \
- liblog \
- libhidlbase \
- libhidltransport \
- libhwbinder \
- libprotobuf-cpp-full \
- libvts_common \
- libvts_multidevice_proto \
- libvts_profiling \
- libutils \
-
-LOCAL_PROTOC_OPTIMIZE_TYPE := full
-
-LOCAL_MULTILIB := both
-
-include $(BUILD_SHARED_LIBRARY)
-
-
-# build VTS profiler for TvInputCallback
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := libvts_profiler_hidl_tv_input_callback_@1.0
-
-LOCAL_SRC_FILES := \
- TvInputCallback.vts \
- types.vts \
- ../../../../audio/common/2.0/vts/types.vts \
-
-LOCAL_C_INCLUDES += \
- test/vts/drivers/libprofiling \
-
-LOCAL_VTS_MODE := PROFILER
-
-LOCAL_SHARED_LIBRARIES += \
- android.hardware.tv.input@1.0 \
- libbase \
- libcutils \
- liblog \
- libhidlbase \
- libhidltransport \
- libhwbinder \
- libprotobuf-cpp-full \
- libvts_common \
- libvts_multidevice_proto \
- libvts_profiling \
- libutils \
-
-LOCAL_PROTOC_OPTIMIZE_TYPE := full
-
-LOCAL_MULTILIB := both
-
-include $(BUILD_SHARED_LIBRARY)
-
+include $(LOCAL_PATH)/functional/vts/testcases/hal/tv_input/hidl/host/Android.mk
predefined_type: "::android::hardware::tv::input::V1_0::Result"
}
return_type_hidl: {
+ type: TYPE_HANDLE
}
arg: {
type: TYPE_SCALAR
--- /dev/null
+#
+# 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)
--- /dev/null
+#
+# 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)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := TvInputHidlTest
+VTS_CONFIG_SRC_DIR := testcases/hal/tv_input/hidl/host
+include test/vts/tools/build/Android.host_config.mk
--- /dev/null
+<?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 Tv Input HIDL HAL's host-side test cases">
+ <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+ <option name="push-group" value="HidlHalTest.push" />
+ <option name="push" value="spec/hardware/interfaces/tv/input/1.0/vts/TvInput.vts->/data/local/tmp/spec/TvInput.vts" />
+ <option name="push" value="spec/hardware/interfaces/tv/input/1.0/vts/TvInputCallback.vts->/data/local/tmp/spec/TvInputCallback.vts" />
+ <option name="push" value="spec/hardware/interfaces/tv/input/1.0/vts/types.vts->/data/local/tmp/spec/types.vts" />
+ <option name="cleanup" value="true" />
+ </target_preparer>
+ <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer">
+ </target_preparer>
+ <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+ <option name="test-module-name" value="TvInputHidlTest" />
+ <option name="test-case-path" value="vts/testcases/hal/tv_input/hidl/host/TvInputHidlTest" />
+ </test>
+</configuration>
--- /dev/null
+#!/usr/bin/env python
+#
+# 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.
+#
+
+import logging
+
+from vts.runners.host import asserts
+from vts.runners.host import base_test_with_webdb
+from vts.runners.host import const
+from vts.runners.host import test_runner
+from vts.utils.python.controllers import android_device
+
+
+class TvInputHidlTest(base_test_with_webdb.BaseTestWithWebDbClass):
+ """Two hello world test cases which use the shell driver."""
+
+ def setUpClass(self):
+ """Creates a mirror and init tv input hal."""
+ self.dut = self.registerController(android_device)[0]
+
+ self.dut.shell.InvokeTerminal("one")
+ self.dut.shell.one.Execute("setenforce 0") # SELinux permissive mode
+
+ self.dut.hal.InitHidlHal(target_type="tv_input",
+ target_basepaths=["/system/lib64"],
+ target_version=1.0,
+ target_package="android.hardware.tv.input",
+ target_component_name="ITvInput",
+ bits=64)
+
+ self.dut.shell.InvokeTerminal("one")
+
+ def testGetStreamConfigurations(self):
+ configs = self.dut.hal.tv_input.getStreamConfigurations(0)
+ logging.info('tv input configs: %s', configs)
+
+
+if __name__ == "__main__":
+ test_runner.main()
}
enumerator: "PUBLIC_CNT"
scalar_value: {
- int32_t: 10
+ int32_t: 11
}
enumerator: "FOR_POLICY_CNT"
scalar_value: {
scalar_value: {
uint32_t: 234881024
}
+ enumerator: "EVRC"
+ scalar_value: {
+ uint32_t: 268435456
+ }
+ enumerator: "EVRCB"
+ scalar_value: {
+ uint32_t: 285212672
+ }
+ enumerator: "EVRCWB"
+ scalar_value: {
+ uint32_t: 301989888
+ }
+ enumerator: "EVRCNW"
+ scalar_value: {
+ uint32_t: 318767104
+ }
+ enumerator: "AAC_ADIF"
+ scalar_value: {
+ uint32_t: 335544320
+ }
+ enumerator: "WMA"
+ scalar_value: {
+ uint32_t: 352321536
+ }
+ enumerator: "WMA_PRO"
+ scalar_value: {
+ uint32_t: 369098752
+ }
+ enumerator: "AMR_WB_PLUS"
+ scalar_value: {
+ uint32_t: 385875968
+ }
+ enumerator: "MP2"
+ scalar_value: {
+ uint32_t: 402653184
+ }
+ enumerator: "QCELP"
+ scalar_value: {
+ uint32_t: 419430400
+ }
+ enumerator: "DSD"
+ scalar_value: {
+ uint32_t: 436207616
+ }
+ enumerator: "FLAC"
+ scalar_value: {
+ uint32_t: 452984832
+ }
+ enumerator: "ALAC"
+ scalar_value: {
+ uint32_t: 469762048
+ }
+ enumerator: "APE"
+ scalar_value: {
+ uint32_t: 486539264
+ }
+ enumerator: "AAC_ADTS"
+ scalar_value: {
+ uint32_t: 503316480
+ }
+ enumerator: "SBC"
+ scalar_value: {
+ uint32_t: 520093696
+ }
+ enumerator: "APTX"
+ scalar_value: {
+ uint32_t: 536870912
+ }
+ enumerator: "APTX_HD"
+ scalar_value: {
+ uint32_t: 553648128
+ }
+ enumerator: "LDAC"
+ scalar_value: {
+ uint32_t: 570425344
+ }
enumerator: "MAIN_MASK"
scalar_value: {
uint32_t: 4278190080
scalar_value: {
uint32_t: 67109376
}
+ enumerator: "AAC_ADTS_MAIN"
+ scalar_value: {
+ uint32_t: 503316481
+ }
+ enumerator: "AAC_ADTS_LC"
+ scalar_value: {
+ uint32_t: 503316482
+ }
+ enumerator: "AAC_ADTS_SSR"
+ scalar_value: {
+ uint32_t: 503316484
+ }
+ enumerator: "AAC_ADTS_LTP"
+ scalar_value: {
+ uint32_t: 503316488
+ }
+ enumerator: "AAC_ADTS_HE_V1"
+ scalar_value: {
+ uint32_t: 503316496
+ }
+ enumerator: "AAC_ADTS_SCALABLE"
+ scalar_value: {
+ uint32_t: 503316512
+ }
+ enumerator: "AAC_ADTS_ERLC"
+ scalar_value: {
+ uint32_t: 503316544
+ }
+ enumerator: "AAC_ADTS_LD"
+ scalar_value: {
+ uint32_t: 503316608
+ }
+ enumerator: "AAC_ADTS_HE_V2"
+ scalar_value: {
+ uint32_t: 503316736
+ }
+ enumerator: "AAC_ADTS_ELD"
+ scalar_value: {
+ uint32_t: 503316992
+ }
}
}
scalar_value: {
uint32_t: 3
}
+ enumerator: "OUT_2POINT1"
+ scalar_value: {
+ uint32_t: 11
+ }
enumerator: "OUT_QUAD"
scalar_value: {
uint32_t: 51
scalar_value: {
uint32_t: 1539
}
+ enumerator: "OUT_SURROUND"
+ scalar_value: {
+ uint32_t: 263
+ }
+ enumerator: "OUT_PENTA"
+ scalar_value: {
+ uint32_t: 55
+ }
enumerator: "OUT_5POINT1"
scalar_value: {
uint32_t: 63
scalar_value: {
uint32_t: 1551
}
+ enumerator: "OUT_6POINT1"
+ scalar_value: {
+ uint32_t: 319
+ }
enumerator: "OUT_7POINT1"
scalar_value: {
uint32_t: 1599
scalar_value: {
uint32_t: 48
}
+ enumerator: "IN_VOICE_UPLINK_MONO"
+ scalar_value: {
+ uint32_t: 16400
+ }
+ enumerator: "IN_VOICE_DNLINK_MONO"
+ scalar_value: {
+ uint32_t: 32784
+ }
+ enumerator: "IN_VOICE_CALL_MONO"
+ scalar_value: {
+ uint32_t: 49168
+ }
enumerator: "IN_ALL"
scalar_value: {
uint32_t: 65532
scalar_value: {
uint32_t: 16777216
}
+ enumerator: "OUT_PROXY"
+ scalar_value: {
+ uint32_t: 33554432
+ }
enumerator: "OUT_DEFAULT"
scalar_value: {
uint32_t: 1073741824
}
enumerator: "OUT_ALL"
scalar_value: {
- uint32_t: 1107296255
+ uint32_t: 1140850687
}
enumerator: "OUT_ALL_A2DP"
scalar_value: {
scalar_value: {
uint32_t: 2148532224
}
+ enumerator: "IN_PROXY"
+ scalar_value: {
+ uint32_t: 2164260864
+ }
enumerator: "IN_DEFAULT"
scalar_value: {
uint32_t: 3221225472
}
enumerator: "IN_ALL"
scalar_value: {
- uint32_t: 3223322623
+ uint32_t: 3240099839
}
enumerator: "IN_ALL_SCO"
scalar_value: {
scalar_value: {
int32_t: 1024
}
+ enumerator: "DIRECT_PCM"
+ scalar_value: {
+ int32_t: 8192
+ }
+ enumerator: "MMAP_NOIRQ"
+ scalar_value: {
+ int32_t: 16384
+ }
}
}
scalar_value: {
int32_t: 8
}
+ enumerator: "MMAP_NOIRQ"
+ scalar_value: {
+ int32_t: 16
+ }
+ }
+}
+
+attribute: {
+ name: "::android::hardware::audio::common::V2_0::AudioUsage"
+ type: TYPE_ENUM
+ enum_value: {
+ scalar_type: "int32_t"
+
+ enumerator: "UNKNOWN"
+ scalar_value: {
+ int32_t: 0
+ }
+ enumerator: "MEDIA"
+ scalar_value: {
+ int32_t: 1
+ }
+ enumerator: "VOICE_COMMUNICATION"
+ scalar_value: {
+ int32_t: 2
+ }
+ enumerator: "VOICE_COMMUNICATION_SIGNALLING"
+ scalar_value: {
+ int32_t: 3
+ }
+ enumerator: "ALARM"
+ scalar_value: {
+ int32_t: 4
+ }
+ enumerator: "NOTIFICATION"
+ scalar_value: {
+ int32_t: 5
+ }
+ enumerator: "NOTIFICATION_TELEPHONY_RINGTONE"
+ scalar_value: {
+ int32_t: 6
+ }
+ enumerator: "NOTIFICATION_COMMUNICATION_REQUEST"
+ scalar_value: {
+ int32_t: 7
+ }
+ enumerator: "NOTIFICATION_COMMUNICATION_INSTANT"
+ scalar_value: {
+ int32_t: 8
+ }
+ enumerator: "NOTIFICATION_COMMUNICATION_DELAYED"
+ scalar_value: {
+ int32_t: 9
+ }
+ enumerator: "NOTIFICATION_EVENT"
+ scalar_value: {
+ int32_t: 10
+ }
+ enumerator: "ASSISTANCE_ACCESSIBILITY"
+ scalar_value: {
+ int32_t: 11
+ }
+ enumerator: "ASSISTANCE_NAVIGATION_GUIDANCE"
+ scalar_value: {
+ int32_t: 12
+ }
+ enumerator: "ASSISTANCE_SONIFICATION"
+ scalar_value: {
+ int32_t: 13
+ }
+ enumerator: "GAME"
+ scalar_value: {
+ int32_t: 14
+ }
+ enumerator: "VIRTUAL_SOURCE"
+ scalar_value: {
+ int32_t: 15
+ }
+ enumerator: "CNT"
+ scalar_value: {
+ int32_t: 16
+ }
+ enumerator: "MAX"
+ scalar_value: {
+ int32_t: 15
+ }
}
}
type: TYPE_SCALAR
scalar_type: "bool_t"
}
+ struct_value: {
+ name: "bitWidth"
+ type: TYPE_SCALAR
+ scalar_type: "uint32_t"
+ }
+ struct_value: {
+ name: "bufferSize"
+ type: TYPE_SCALAR
+ scalar_type: "uint32_t"
+ }
+ struct_value: {
+ name: "usage"
+ type: TYPE_ENUM
+ predefined_type: "::android::hardware::audio::common::V2_0::AudioUsage"
+ }
}
attribute: {