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 | 2ba0910 | 2020-02-07 07:19:19 -0800 | [diff] [blame^] | 12 | ATTRIBUTES = 'suite:bluetooth, suite:bluetooth_standalone' |
Shijin Abraham | 018a05a | 2019-07-09 14:26:20 -0700 | [diff] [blame] | 13 | TIME = 'MEDIUM' # 6 minutes on EVE |
| 14 | TEST_CATEGORY = 'Functional' |
| 15 | TEST_CLASS = 'bluetooth' |
| 16 | TEST_TYPE = 'server' |
| 17 | DEPENDENCIES = 'bluetooth' |
| 18 | |
| 19 | DOC = """ |
| 20 | Verify that DiscoverableTimeout Property works as expected |
| 21 | |
| 22 | - Set and Read back DiscoverableTimeout and make sure the values match |
| 23 | - Set discoverable |
| 24 | - Check that adapter is discoverable till DiscoverableTimeout and then it |
| 25 | is not discoverable |
| 26 | - Set DiscoverableTimeout to default value at the end of the test. |
| 27 | |
| 28 | """ |
| 29 | |
| 30 | args_dict = utils.args_to_dict(args) |
Shijin Abraham | 018a05a | 2019-07-09 14:26:20 -0700 | [diff] [blame] | 31 | |
| 32 | def run(machine): |
Shijin Abraham | 7a1f47f | 2020-01-03 15:35:14 -0800 | [diff] [blame] | 33 | host = hosts.create_host(machine) |
Shijin Abraham | 018a05a | 2019-07-09 14:26:20 -0700 | [diff] [blame] | 34 | job.run_test('bluetooth_AdapterSASanity', host=host, |
| 35 | num_iterations=1, test_name=NAME.split('.')[1]) |
| 36 | |
| 37 | parallel_simple(run, machines) |