Shijin Abraham | 018a05a | 2019-07-09 14:26:20 -0700 | [diff] [blame] | 1 | # Copyright 2019 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 | |
| 5 | from autotest_lib.server import utils |
Michael Sun | 8f81f38 | 2019-08-12 14:42:26 -0700 | [diff] [blame] | 6 | from autotest_lib.server.cros.bluetooth import bluetooth_test |
Shijin Abraham | 018a05a | 2019-07-09 14:26:20 -0700 | [diff] [blame] | 7 | |
| 8 | AUTHOR = 'chromeos-bluetooth' |
| 9 | NAME = 'bluetooth_AdapterSASanity.sa_adapter_discoverable_timeout_test' |
| 10 | PURPOSE = 'Test DiscoverableTimout Property' |
| 11 | CRITERIA = 'Controller should become not discoverable after timeout' |
Shijin Abraham | a168e07 | 2019-07-25 21:15:55 -0700 | [diff] [blame] | 12 | ATTRIBUTES = ('suite:bluetooth, suite:bluetooth_sanity,' |
| 13 | 'suite:bluetooth_standalone') |
Shijin Abraham | 018a05a | 2019-07-09 14:26:20 -0700 | [diff] [blame] | 14 | TIME = 'MEDIUM' # 6 minutes on EVE |
| 15 | TEST_CATEGORY = 'Functional' |
| 16 | TEST_CLASS = 'bluetooth' |
| 17 | TEST_TYPE = 'server' |
| 18 | DEPENDENCIES = 'bluetooth' |
| 19 | |
| 20 | DOC = """ |
| 21 | Verify that DiscoverableTimeout Property works as expected |
| 22 | |
| 23 | - Set and Read back DiscoverableTimeout and make sure the values match |
| 24 | - Set discoverable |
| 25 | - Check that adapter is discoverable till DiscoverableTimeout and then it |
| 26 | is not discoverable |
| 27 | - Set DiscoverableTimeout to default value at the end of the test. |
| 28 | |
| 29 | """ |
| 30 | |
| 31 | args_dict = utils.args_to_dict(args) |
Shijin Abraham | 018a05a | 2019-07-09 14:26:20 -0700 | [diff] [blame] | 32 | |
| 33 | def run(machine): |
Shijin Abraham | 7a1f47f | 2020-01-03 15:35:14 -0800 | [diff] [blame] | 34 | host = hosts.create_host(machine) |
Shijin Abraham | 018a05a | 2019-07-09 14:26:20 -0700 | [diff] [blame] | 35 | job.run_test('bluetooth_AdapterSASanity', host=host, |
| 36 | num_iterations=1, test_name=NAME.split('.')[1]) |
| 37 | |
| 38 | parallel_simple(run, machines) |