1#/usr/bin/env python3.4 2# 3# Copyright (C) 2016 The Android Open Source Project 4# 5# Licensed under the Apache License, Version 2.0 (the "License"); you may not 6# use this file except in compliance with the License. You may obtain a copy of 7# 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, WITHOUT 13# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14# License for the specific language governing permissions and limitations under 15# the License. 16 17import acts.base_test as base_test 18 19class WifiNativeTest(base_test.BaseTestClass): 20 tests = None 21 22 def __init__(self, controllers): 23 base_test.BaseTestClass.__init__(self, controllers) 24 self.device = self.native_android_devices[0] 25 self.tests = ( 26 "test_hal_get_features", 27 ) 28 29 def setup_test(self): 30# TODO: uncomment once wifi_toggle_state (or alternative) 31# work with sl4n 32# assert wutils.wifi_toggle_state(self.device, True) 33 return self.device.droid.WifiInit() 34 35# TODO: uncomment once wifi_toggle_state (or alternative) 36# work with sl4n 37# def teardown_class(self): 38# assert wutils.wifi_toggle_state(self.device, False) 39 40 def test_hal_get_features(self): 41 result = self.device.droid.WifiGetSupportedFeatureSet() 42 self.log.info("Wi-Fi feature set: {}".format(result)) 43