1# Copyright 2020 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_AdapterSASanity.sa_reboot_advertising_test' 9PURPOSE = 'Test bluetooth adapter advertising.' 10CRITERIA = 'Adapter should advertise with correct parameters.' 11ATTRIBUTES = 'suite:bluetooth_flaky' 12TIME = 'SHORT' # ~3 minutes on Eve 13TEST_CATEGORY = 'Functional' 14TEST_CLASS = 'bluetooth' 15TEST_TYPE = 'server' 16DEPENDENCIES = 'bluetooth' 17 18DOC = """ 19This test case verifies that the Bluetooth adapter of the DUT can 20behave as a Bluetooth low-energy device and advertise correctly around 21the adapter being power-cycled. 22 23This autotest include the following test cases: 24 self.test_case_SI200_RA3_CD_PC_CD_UA3() 25 self.test_case_RA3_CD_SI200_CD_PC_CD_UA3() 26 self.test_case_RA1_CD_SI200_CD_PC_CD_UA1() 27 28Mnemonics of the test cases: 29 CD: check advertising duration and intervals 30 RA: register advertisements 31 UA: unregister advertisements 32 SI: set advertising intervals 33 RS: reset advertising 34 FRA: fail to register extra advertisements when max ones have 35 been registered. 36 FSI: fail to set advertising intervals beyond legitimate range 37 of [20 ms, 10,240 ms]. 38 PC: power cycle the bluetooth adapter (controller). 39 SR: suspend and resume the DUT (chromebook) 40 41""" 42 43args_dict = utils.args_to_dict(args) 44 45def run(machine): 46 host = hosts.create_host(machine) 47 job.run_test('bluetooth_AdapterSASanity', host=host, 48 num_iterations=1, test_name=NAME.split('.')[1]) 49 50parallel_simple(run, machines) 51