Home | History | Annotate | Download | only in bluetooth_Sanity_AdapterPresent
      1 # Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 from autotest_lib.client.common_lib import error
      6 from autotest_lib.server.cros.bluetooth import bluetooth_test
      7 
      8 
      9 class bluetooth_Sanity_AdapterPresent(bluetooth_test.BluetoothTest):
     10     """
     11     Verify that the client has a Bluetooth adapter.
     12     """
     13     version = 1
     14 
     15     def run_once(self):
     16         # Reset the adapter (if any) to the powered off state.
     17         if not self.device.reset_off():
     18             raise error.TestFail('DUT could not be reset to initial state')
     19 
     20         # Verify that there is an adapter. This will only return True if both
     21         # the kernel and bluetooth daemon see the adapter.
     22         if not self.device.has_adapter():
     23             raise error.TestFail('Adapter not present')
     24