tv hdmi vts test init
Test: make vts Change-Id: Ia101262c912648ecc0a77a43e1c976f3d0108a9b
This commit is contained in:
parent
54da2f1a55
commit
09b86957a8
13 changed files with 227 additions and 4 deletions
|
@ -19,7 +19,7 @@ LOCAL_PATH := $(call my-dir)
|
|||
# build VTS driver for TvCec v1.0.
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := libvts_driver_hidl_tv_hdmi_cec@1.0
|
||||
LOCAL_MODULE := libvts_driver_hidl_tv_cec@1.0
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
HdmiCec.vts \
|
||||
|
@ -51,7 +51,7 @@ include $(BUILD_SHARED_LIBRARY)
|
|||
# build VTS profiler for HdmiCec
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := libvts_profiler_hidl_tv_hdmi_cec@1.0
|
||||
LOCAL_MODULE := libvts_profiler_hidl_tv_cec@1.0
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
HdmiCec.vts \
|
||||
|
@ -86,7 +86,7 @@ include $(BUILD_SHARED_LIBRARY)
|
|||
# build VTS profiler for HdmiCecCallback
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := libvts_profiler_hidl_tv_hdmi_cec_callback_@1.0
|
||||
LOCAL_MODULE := libvts_profiler_hidl_tv_cec_callback_@1.0
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
HdmiCecCallback.vts \
|
||||
|
@ -115,4 +115,6 @@ LOCAL_PROTOC_OPTIMIZE_TYPE := full
|
|||
|
||||
LOCAL_MULTILIB := both
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
include $(call all-makefiles-under,$(LOCAL_PATH))
|
19
tv/cec/1.0/vts/functional/Android.mk
Normal file
19
tv/cec/1.0/vts/functional/Android.mk
Normal 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)
|
19
tv/cec/1.0/vts/functional/vts/Android.mk
Normal file
19
tv/cec/1.0/vts/functional/vts/Android.mk
Normal 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)
|
19
tv/cec/1.0/vts/functional/vts/testcases/Android.mk
Normal file
19
tv/cec/1.0/vts/functional/vts/testcases/Android.mk
Normal 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)
|
19
tv/cec/1.0/vts/functional/vts/testcases/hal/Android.mk
Normal file
19
tv/cec/1.0/vts/functional/vts/testcases/hal/Android.mk
Normal 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)
|
|
@ -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)
|
|
@ -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)
|
|
@ -0,0 +1,25 @@
|
|||
#
|
||||
# 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 := TvCecHidlTest
|
||||
VTS_CONFIG_SRC_DIR := testcases/hal/tv_cec/hidl/host
|
||||
include test/vts/tools/build/Android.host_config.mk
|
|
@ -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 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/cec/1.0/vts/HdmiCec.vts->/data/local/tmp/spec/HdmiCec.vts" />
|
||||
<option name="push" value="spec/hardware/interfaces/tv/cec/1.0/vts/HdmiCecCallback.vts->/data/local/tmp/spec/HdmiCecCallback.vts" />
|
||||
<option name="push" value="spec/hardware/interfaces/tv/cec/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="TvCecHidlTest" />
|
||||
<option name="test-case-path" value="vts/testcases/hal/tv_cec/hidl/host/TvCecHidlTest" />
|
||||
</test>
|
||||
</configuration>
|
|
@ -0,0 +1,52 @@
|
|||
#!/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 TvCecHidlTest(base_test_with_webdb.BaseTestWithWebDbClass):
|
||||
"""Host testcase class for the TV HDMI_CEC HIDL HAL."""
|
||||
|
||||
def setUpClass(self):
|
||||
"""Creates a mirror and init tv hdmi cec hal service."""
|
||||
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_cec",
|
||||
target_basepaths=["/system/lib64"],
|
||||
target_version=1.0,
|
||||
target_package="android.hardware.tv.cec",
|
||||
target_component_name="IHdmiCec",
|
||||
bits=64)
|
||||
|
||||
def testGetCecVersion1(self):
|
||||
"""A simple test case which queries the cec version."""
|
||||
logging.info('DIR HAL %s', dir(self.dut.hal))
|
||||
version = self.dut.hal.tv_cec.getCecVersion()
|
||||
logging.info('Cec version: %s', version)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_runner.main()
|
Loading…
Reference in a new issue