1# Copyright 2019 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 5from autotest_lib.server import utils 6from autotest_lib.server.cros.bluetooth import bluetooth_test 7 8AUTHOR = 'chromeos-bluetooth' 9NAME = 'bluetooth_AdapterCLSanity.cl_adapter_pairing_test' 10PURPOSE = 'Test bluetooth adapter pairing and connecting to a bluetooth device.' 11CRITERIA = 'Adapter should work in correct states.' 12ATTRIBUTES = 'suite:bluetooth, suite:bluetooth_e2e' 13TIME = 'SHORT' 14TEST_CATEGORY = 'Functional' 15TEST_CLASS = 'bluetooth' 16TEST_TYPE = 'server' 17DEPENDENCIES = 'bluetooth, chameleon:bt_hid' 18 19DOC = """ 20Verify that the bluetooth adapter of the DUT could pair and connect 21to a bluetooth device. 22 23Specifically, the following subtests are executed in this autotest. 24 - test_reset_on_adapter 25 - test_pairable 26 - test_discover_device 27 - test_stop_discovery 28 - test_device_name 29 - test_device_class_of_service 30 - test_device_class_of_device 31 - test_pairing 32 - test_connection_by_adapter 33 - test_disconnection_by_adapter 34 - test_connection_by_device 35 - test_disconnection_by_device 36 - test_remove_pairing 37""" 38 39args_dict = utils.args_to_dict(args) 40chameleon_args = hosts.CrosHost.get_chameleon_arguments(args_dict) 41 42def run(machine): 43 host = hosts.create_host(machine, chameleon_args=chameleon_args) 44 job.run_test('bluetooth_AdapterCLSanity', host=host, 45 num_iterations=1, test_name=NAME.split('.')[1]) 46 47parallel_simple(run, machines) 48