• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python
2#
3# Copyright (C) 2016 The Android Open Source Project
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9#      http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17
18import logging
19
20from vts.runners.host import asserts
21from vts.runners.host import test_runner
22from vts.testcases.template.hal_hidl_host_test import hal_hidl_host_test
23
24
25class VtsHalRadioV1_0HostTest(hal_hidl_host_test.HalHidlHostTest):
26    """A simple testcase for the Radio HIDL HAL."""
27
28    TEST_HAL_SERVICES = {"android.hardware.radio@1.0::IRadio"}
29    def setUpClass(self):
30        """Creates a mirror and init radio hal."""
31        super(VtsHalRadioV1_0HostTest, self).setUpClass()
32
33        self.dut.hal.InitHidlHal(
34            target_type="radio",
35            target_basepaths=self.dut.libPaths,
36            target_version=1.0,
37            target_package="android.hardware.radio",
38            target_component_name="IRadio",
39            hw_binder_service_name="slot1",
40            bits=int(self.abi_bitness))
41
42        self.radio = self.dut.hal.radio  # shortcut
43        self.radio_types = self.dut.hal.radio.GetHidlTypeInterface("types")
44        logging.info("Radio types: %s", self.radio_types)
45
46    def testHelloWorld(self):
47        logging.info('hello world')
48
49
50if __name__ == "__main__":
51    test_runner.main()
52