| # Copyright 2022 The ChromiumOS Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| # This test case verifies that the Bluetooth adapter of the DUT can behave as |
| # a Bluetooth low-energy device and register a single advertisement with data |
| # and parameters correctly. This test case also verifies that the single |
| # advertisement could be registered and unregistered continuously. |
| # |
| # This autotest include the following test cases: |
| # self.test_case_SI200_RA1_CD_UA1() |
| # self.test_case_SI200_RA1_CD_RS() |
| # self.test_case_RA1_CD_SI200_CD_UA1() |
| # self.test_case_RA1_CD_SI200_CD_RS() |
| # self.test_case_RA1_CD_SI200_CD_FSI10_UA1_RA1_CD_UA1() |
| # self.test_case_RA1_CD_SI200_CD_FSI20000_UA1_RA1_CD_UA1() |
| # |
| # Specifically, the subtests included in this autotest verify the |
| # following operations and parameters. |
| # - test_register_advertisement |
| # * A single advertisement is registered successfully. |
| # * The advertising min/max intervals are set correctly. |
| # . The intervals are set to specified values. |
| # . The intervals are set to default values after reset. |
| # * The manufacturer id is set correctly. |
| # * The service UUIDs are set correctly. |
| # * The service data is set correctly. |
| # * Advertising is enabled consequently. |
| # - test_reset_advertising |
| # * The single advertisement instance is removed. |
| # * Advertising is disabled consequently. |
| # |
| # Mnemonics of the test cases: |
| # CD: check advertising duration and intervals |
| # RA: register advertisements |
| # UA: unregister advertisements |
| # SI: set advertising intervals |
| # RS: reset advertising |
| # FSI: fail to set advertising intervals beyond legitimate range |
| # of [20 ms, 10,240 ms]. |
| # SR: suspend and resume the DUT (chromebook) |
| |
| |
| NAME = 'bluetooth_AdapterAdvHealth.adv_single_advertising_test.floss' |
| METADATA = { |
| 'contacts': ['chromeos-bt-team@google.com'], |
| # ChromeOS > Platform > Connectivity > Bluetooth |
| 'bug_component': 'b:167317', |
| 'criteria': 'Test bluetooth adapter single advertising capability', |
| 'hw_agnostic': True, |
| 'requirements': ['bt-gen-0001-v01'], |
| } |
| ATTRIBUTES = 'suite:bluetooth_floss' |
| TEST_TYPE = 'server' |
| DEPENDENCIES = 'bluetooth_state:NORMAL' |
| |
| def run(machine): |
| host = hosts.create_host(machine) |
| job.run_test('bluetooth_AdapterAdvHealth', host=host, num_iterations=1, |
| tag='.'.join(NAME.split('.')[1:]), |
| test_name=NAME.split('.')[1], peer_required=False,floss =True) |
| |
| parallel_simple(run, machines) |