vts test project init for radio hal
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 RadioHidlTest -l INFO Change-Id: I794108d253bbdfa36a8aa6db336127721a51a017
This commit is contained in:
parent
43511435d2
commit
e98c0fa8aa
9 changed files with 151 additions and 6 deletions
|
@ -16,4 +16,4 @@
|
|||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(call all-subdir-makefiles)
|
||||
include $(LOCAL_PATH)/functional/vts/testcases/hal/radio/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)
|
|
@ -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 := RadioHidlTest
|
||||
VTS_CONFIG_SRC_DIR := testcases/hal/radio/hidl/host
|
||||
include test/vts/tools/build/Android.host_config.mk
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2017 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 HAL Radio test cases">
|
||||
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
|
||||
<option name="push-group" value="HidlHalTest.push" />
|
||||
<option name="cleanup" value="true" />
|
||||
<option name="push" value="spec/hardware/interfaces/radio/1.0/vts/Radio.vts->/data/local/tmp/spec/Radio.vts" />
|
||||
<option name="push" value="spec/hardware/interfaces/radio/1.0/vts/RadioIndication.vts->/data/local/tmp/spec/RadioIndication.vts" />
|
||||
<option name="push" value="spec/hardware/interfaces/radio/1.0/vts/RadioResponse.vts->/data/local/tmp/spec/RadioResponse.vts" />
|
||||
<option name="push" value="spec/hardware/interfaces/radio/1.0/vts/Sap.vts->/data/local/tmp/spec/Sap.vts" />
|
||||
<option name="push" value="spec/hardware/interfaces/radio/1.0/vts/SapCallback.vts->/data/local/tmp/spec/SapCallback.vts" />
|
||||
<option name="push" value="spec/hardware/interfaces/radio/1.0/vts/types.vts->/data/local/tmp/spec/types.vts" />
|
||||
</target_preparer>
|
||||
<target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
|
||||
<test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
|
||||
<option name="test-module-name" value="RadioHidlTest" />
|
||||
<option name="test-case-path" value="vts/testcases/hal/radio/hidl/host/RadioHidlTest" />
|
||||
</test>
|
||||
</configuration>
|
|
@ -0,0 +1,71 @@
|
|||
#!/usr/bin/env python3.4
|
||||
#
|
||||
# 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
|
||||
import time
|
||||
|
||||
from vts.runners.host import asserts
|
||||
from vts.runners.host import base_test_with_webdb
|
||||
from vts.runners.host import test_runner
|
||||
from vts.utils.python.controllers import android_device
|
||||
from vts.utils.python.profiling import profiling_utils
|
||||
|
||||
|
||||
class VehicleHidlTest(base_test_with_webdb.BaseTestWithWebDbClass):
|
||||
"""A simple testcase for the VEHICLE HIDL HAL."""
|
||||
|
||||
def setUpClass(self):
|
||||
"""Creates a mirror and init vehicle hal."""
|
||||
self.dut = self.registerController(android_device)[0]
|
||||
|
||||
self.dut.shell.InvokeTerminal("one")
|
||||
self.dut.shell.one.Execute("setenforce 0") # SELinux permissive mode
|
||||
|
||||
if self.enable_profiling:
|
||||
profiling_utils.EnableVTSProfiling(self.dut.shell.one)
|
||||
|
||||
self.dut.hal.InitHidlHal(
|
||||
target_type="radio",
|
||||
target_basepaths=self.dut.libPaths,
|
||||
target_version=1.0,
|
||||
target_package="android.hardware.radio",
|
||||
target_component_name="IRadio",
|
||||
hw_binder_service_name="Radio",
|
||||
bits=64 if self.dut.is64Bit else 32)
|
||||
|
||||
self.radio = self.dut.hal.radio # shortcut
|
||||
self.radio_types = self.dut.hal.radio.GetHidlTypeInterface("types")
|
||||
logging.info("Radio types: %s", self.radio_types)
|
||||
|
||||
def tearDownClass(self):
|
||||
"""Disables the profiling.
|
||||
|
||||
If profiling is enabled for the test, collect the profiling data
|
||||
and disable profiling after the test is done.
|
||||
"""
|
||||
if self.enable_profiling:
|
||||
profiling_trace_path = getattr(
|
||||
self, self.VTS_PROFILING_TRACING_PATH, "")
|
||||
self.ProcessAndUploadTraceData(self.dut, profiling_trace_path)
|
||||
profiling_utils.DisableVTSProfiling(self.dut.shell.one)
|
||||
|
||||
def testHelloWorld(self):
|
||||
logging.info('hello world')
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_runner.main()
|
|
@ -2730,23 +2730,23 @@ attribute: {
|
|||
|
||||
enumerator: "GSM"
|
||||
scalar_value: {
|
||||
int32_t: 0
|
||||
int32_t: 1
|
||||
}
|
||||
enumerator: "CDMA"
|
||||
scalar_value: {
|
||||
int32_t: 1
|
||||
int32_t: 2
|
||||
}
|
||||
enumerator: "LTE"
|
||||
scalar_value: {
|
||||
int32_t: 2
|
||||
int32_t: 3
|
||||
}
|
||||
enumerator: "WCDMA"
|
||||
scalar_value: {
|
||||
int32_t: 3
|
||||
int32_t: 4
|
||||
}
|
||||
enumerator: "TD_SCDMA"
|
||||
scalar_value: {
|
||||
int32_t: 4
|
||||
int32_t: 5
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue