1# Copyright 2021 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 6 7AUTHOR = 'chromeos-bluetooth' 8NAME = 'bluetooth_AdapterLEHealth.le_hid_reconnect_speed' 9PURPOSE = 'Test the speed of a LE HID device reconnect to DUT.' 10CRITERIA = 'LE HID device should reconnect fast.' 11# TODO: Remove ['Quick Health'] flag from AdapterLEHealth when moving to stable. 12ATTRIBUTES = 'suite:bluetooth_flaky' 13TIME = 'SHORT' 14TEST_CATEGORY = 'Functional' 15TEST_CLASS = 'bluetooth' 16TEST_TYPE = 'server' 17DEPENDENCIES = 'bluetooth_state:NORMAL, working_bluetooth_btpeer:1' 18PY_VERSION = 3 19 20DOC = """ 21Test the speed of a LE HID device reconnect to DUT 22 23Specifically, the following subtests are executed in this autotest. 24 - test_reset_on_adapter 25 - test_pairable 26 - test_discover_device 27 - test_pairing 28 - test_device_is_connected 29 - test_hid_device_created 30 - test_device_set_discoverable 31 - test_disconnection_by_device 32 - iteration start 33 - test_device_is_not_connected 34 - test_device_set_discoverable 35 - test_device_is_connected 36 - test_hid_device_created_speed 37 - test_device_set_discoverable 38 - test_disconnection_by_device 39 - iteration end 40 - test_remove_pairing 41 - test_hid_device_reconnect_time 42""" 43 44args_dict = utils.args_to_dict(args) 45 46def run(machine): 47 host = hosts.create_host(machine) 48 job.run_test('bluetooth_AdapterLEHealth', host=host, 49 num_iterations=1, args_dict=args_dict, 50 test_name=NAME.split('.')[1]) 51 52parallel_simple(run, machines) 53