• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
5AUTHOR = 'chromeos-bluetooth'
6NAME = 'bluetooth_AdapterAdvHealth.adv_multiple_advertising_test'
7PURPOSE = 'Test bluetooth adapter advertising.'
8CRITERIA = 'Adapter should advertise with correct parameters.'
9ATTRIBUTES = 'suite:bluetooth_flaky'
10TIME = 'LONG'  # It takes about 15 minutes on Eve.
11MAX_RESULT_SIZE_KB = 512000
12TEST_CATEGORY = 'Functional'
13TEST_CLASS = 'bluetooth'
14TEST_TYPE = 'server'
15DEPENDENCIES = 'bluetooth'
16
17DOC = """
18This test case verifies that the Bluetooth adapter of the DUT can
19behave as a Bluetooth low-energy device and register multiple
20advertisements with data and parameters correctly. This test case also
21verifies that advertisements could be registered and unregistered
22continuously.
23
24Specifically, this autotest include the following test cases:
25    self.test_case_SI200_RA3_CD_UA3()
26    self.test_case_SI200_RA3_CD_RA1_CD_UA1_CD_UA3()
27    self.test_case_SI200_RA3_CD_RS()
28    self.test_case_SI200_RA3_CD_UA1_CD_RS()
29    self.test_case_SI200_RA3_CD_UA1_CD_RA2_CD_UA4()
30    self.test_case_SI200_RA5_CD_FRA1_CD_UA5()
31    self.test_case_RA3_CD_SI200_CD_UA3()
32    self.test_case_RA3_CD_SI200_CD_RS()
33    self.test_case_RA3_CD_SI200_CD_UA1_CD_RS()
34    self.test_case_RA3_CD_SI200_CD_SI2000_CD_UA3()
35    self.test_case_RA5_CD_SI200_CD_FRA1_CD_UA5()
36    self.test_case_RA3_CD_SI200_CD_FSI10_CD_FSI20000_CD_UA3()
37
38
39Mnemonics of the test cases:
40    CD: check advertising duration and intervals
41    RA: register advertisements
42    UA: unregister advertisements
43    SI: set advertising intervals
44    RS: reset advertising
45    FRA: fail to register extra advertisements when max ones have
46         been registered.
47    FSI: fail to set advertising intervals beyond legitimate range
48         of [20 ms, 10,240 ms].
49    PC: power cycle the bluetooth adapter (controller).
50    SR: suspend and resume the DUT (chromebook)
51
52
53Every test case consists of a sequence of tests:
54    test_register_advertisement
55      * All advertisements are registered successfully.
56      * The advertising min/max intervals are set correctly.
57        . The intervals are set to specified values.
58        . The intervals are set to default values after reset.
59      * The manufacturer id is set correctly.
60      * The service UUIDs are set correctly.
61      * The service data is set correctly.
62      * Advertising is enabled consequently.
63    test_set_advertising_intervals
64      * The new advertising intervals are set correctly.
65    test_reset_advertising
66      * All advertisement instances are removed.
67      * Advertising is disabled consequently.
68    test_check_duration_and_intervals
69      * The duration is correct.
70      * The new advertising intervals are set correctly.
71    test_fail_to_register_advertisement
72      * Max advertisements reached error.
73      * Extra advertisement is not added.
74      * The advertising min/max intervals remain the same.
75      * Advertising remains enabled.
76    test_unregister_advertisement
77      * The advertisement is removed.
78      * Advertising is disabled when the last one is removed.
79    test_fail_to_set_advertising_intervals
80      * It incurs invalid interval error.
81      * The advertising min/max intervals remain the same.
82"""
83
84def run(machine):
85    host = hosts.create_host(machine)
86    job.run_test('bluetooth_AdapterAdvHealth', host=host, num_iterations=1,
87                 test_name=NAME.split('.')[1], peer_required=False)
88
89parallel_simple(run, machines)
90