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_AdapterAdvHealth.adv_peer_test'
9PURPOSE = ('batch of Bluetooth advertising tests')
10CRITERIA = 'Adapter should advertise with correct parameters'
11ATTRIBUTES = 'suite:bluetooth_flaky'
12TIME = 'SHORT'  # ~3 minutes on Sarien
13TEST_CATEGORY = 'Functional'
14TEST_CLASS = 'bluetooth'
15TEST_TYPE = 'server'
16DEPENDENCIES = 'bluetooth, working_bluetooth_btpeer:1'
17
18DOC = """
19    Advertising peer test.
20
21    This test configures and enables multiple advertising instances on the DUT,
22    and then confirms that they are all discoverable independently from an
23    external device. It also confirms the correctness of the advertising by
24    comparing it to the original advertisement configured on the DUT side.
25    """
26
27args_dict = utils.args_to_dict(args)
28
29def run(machine):
30    host = hosts.create_host(machine)
31    job.run_test('bluetooth_AdapterAdvHealth', host=host, num_iterations=1,
32                 args_dict=args_dict, test_name=NAME.split('.')[1])
33
34parallel_simple(run, machines)