aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYing Hsu <yinghsu@chromium.org>2022-05-25 22:21:38 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-05-27 06:22:13 +0000
commit1b868b681f52ad2d6bb75ae37532a6c7280d6e50 (patch)
tree20f9fedc5fbea571feaf8e83f094e268534ddedb
parentc315d8864f96b057247e8ed48459e8313c2461cf (diff)
downloadautotest-1b868b681f52ad2d6bb75ae37532a6c7280d6e50.tar.gz
autotest: supporting more classic health reconnect tests on Floss
cl_adapter_pairing_suspend_resume_test.floss cl_adapter_pairing_twice_test.floss cl_connect_disconnect_by_device_loop_test.floss cl_connect_disconnect_loop_test.floss BUG=b:216347372 TEST=manual test Change-Id: Iafdd8a4d5d133e694fd65db6346effb63e24bf15 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/3666762 Tested-by: Ying Hsu <yinghsu@chromium.org> Commit-Queue: Ying Hsu <yinghsu@chromium.org> Reviewed-by: Shuo-Peng Liao <deanliao@chromium.org> Auto-Submit: Ying Hsu <yinghsu@chromium.org> Commit-Queue: Shuo-Peng Liao <deanliao@chromium.org>
-rw-r--r--server/site_tests/bluetooth_AdapterCLHealth/bluetooth_AdapterCLHealth.py15
-rw-r--r--server/site_tests/bluetooth_AdapterCLHealth/control.cl_adapter_pairing_suspend_resume_test.floss47
-rw-r--r--server/site_tests/bluetooth_AdapterCLHealth/control.cl_adapter_pairing_twice_test.floss47
-rw-r--r--server/site_tests/bluetooth_AdapterCLHealth/control.cl_connect_disconnect_by_device_loop_test.floss48
-rw-r--r--server/site_tests/bluetooth_AdapterCLHealth/control.cl_connect_disconnect_loop_test.floss32
5 files changed, 185 insertions, 4 deletions
diff --git a/server/site_tests/bluetooth_AdapterCLHealth/bluetooth_AdapterCLHealth.py b/server/site_tests/bluetooth_AdapterCLHealth/bluetooth_AdapterCLHealth.py
index a5f2d09ab2..25d4cc1141 100644
--- a/server/site_tests/bluetooth_AdapterCLHealth/bluetooth_AdapterCLHealth.py
+++ b/server/site_tests/bluetooth_AdapterCLHealth/bluetooth_AdapterCLHealth.py
@@ -77,7 +77,9 @@ class bluetooth_AdapterCLHealth(BluetoothAdapterQuickTests,
self.run_keyboard_tests)
- @test_wrapper('Pairing Suspend Resume Test', devices={"MOUSE": 1})
+ @test_wrapper('Pairing Suspend Resume Test',
+ devices={"MOUSE": 1},
+ supports_floss=True)
def cl_adapter_pairing_suspend_resume_test(self):
"""Performs pairing test over resume with mouse peripheral"""
device = self.devices['MOUSE'][0]
@@ -87,7 +89,9 @@ class bluetooth_AdapterCLHealth(BluetoothAdapterQuickTests,
suspend_resume=True)
- @test_wrapper('Pairing Twice Test', devices={"MOUSE":1})
+ @test_wrapper('Pairing Twice Test',
+ devices={"MOUSE": 1},
+ supports_floss=True)
def cl_adapter_pairing_twice_test(self):
"""Performs pairing twice test with mouse peripheral"""
device = self.devices['MOUSE'][0]
@@ -168,7 +172,8 @@ class bluetooth_AdapterCLHealth(BluetoothAdapterQuickTests,
@test_wrapper('Connect Disconnect by Device Loop Test',
devices={"MOUSE": 1},
- flags=['Quick Health'])
+ flags=['Quick Health'],
+ supports_floss=True)
def cl_connect_disconnect_by_device_loop_test(self):
"""Performs connect/disconnect by device test with mouse peripheral"""
device = self.devices['MOUSE'][0]
@@ -179,7 +184,9 @@ class bluetooth_AdapterCLHealth(BluetoothAdapterQuickTests,
check_connected_method=self.test_mouse_move_in_xy)
- @test_wrapper('Connect Disconnect Loop Test', devices={"MOUSE":1})
+ @test_wrapper('Connect Disconnect Loop Test',
+ devices={"MOUSE": 1},
+ supports_floss=True)
def cl_connect_disconnect_loop_test(self):
"""Performs connect/disconnect test with mouse peripheral"""
device = self.devices['MOUSE'][0]
diff --git a/server/site_tests/bluetooth_AdapterCLHealth/control.cl_adapter_pairing_suspend_resume_test.floss b/server/site_tests/bluetooth_AdapterCLHealth/control.cl_adapter_pairing_suspend_resume_test.floss
new file mode 100644
index 0000000000..a7cdbd092a
--- /dev/null
+++ b/server/site_tests/bluetooth_AdapterCLHealth/control.cl_adapter_pairing_suspend_resume_test.floss
@@ -0,0 +1,47 @@
+# Copyright 2022 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from autotest_lib.server import utils
+
+AUTHOR = 'chromeos-bluetooth'
+NAME = 'bluetooth_AdapterCLHealth.cl_adapter_pairing_suspend_resume_test.floss'
+PURPOSE = 'Test adapter pairing and connecting to a bluetooth device after suspend/resume'
+CRITERIA = 'Adapter should work in correct states.'
+ATTRIBUTES = 'suite:bluetooth_floss'
+TIME = 'SHORT'
+TEST_CATEGORY = 'Functional'
+TEST_CLASS = 'bluetooth'
+TEST_TYPE = 'server'
+DEPENDENCIES = 'bluetooth, working_bluetooth_btpeer:1'
+PY_VERSION = 3
+
+DOC = """
+Verify that the bluetooth adapter of the DUT could pair and connect
+to a bluetooth device.
+
+Specifically, the following subtests are executed in this autotest.
+ - test_reset_on_adapter
+ - test_pairable
+ - test_discover_device
+ - test_stop_discovery
+ - test_device_name
+ - test_device_class_of_service
+ - test_device_class_of_device
+ - test_pairing
+ - test_connection_by_adapter
+ - test_disconnection_by_adapter
+ - test_connection_by_device
+ - test_disconnection_by_device
+ - test_remove_pairing
+"""
+
+args_dict = utils.args_to_dict(args)
+
+def run(machine):
+ host = hosts.create_host(machine)
+ job.run_test('bluetooth_AdapterCLHealth', host=host,
+ num_iterations=1, args_dict=args_dict,
+ test_name=NAME.split('.')[1], floss=True)
+
+parallel_simple(run, machines)
diff --git a/server/site_tests/bluetooth_AdapterCLHealth/control.cl_adapter_pairing_twice_test.floss b/server/site_tests/bluetooth_AdapterCLHealth/control.cl_adapter_pairing_twice_test.floss
new file mode 100644
index 0000000000..5a3bf99285
--- /dev/null
+++ b/server/site_tests/bluetooth_AdapterCLHealth/control.cl_adapter_pairing_twice_test.floss
@@ -0,0 +1,47 @@
+# Copyright 2022 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from autotest_lib.server import utils
+
+AUTHOR = 'chromeos-bluetooth'
+NAME = 'bluetooth_AdapterCLHealth.cl_adapter_pairing_twice_test.floss'
+PURPOSE = 'Test bluetooth adapter pairing and connecting to a bluetooth device.'
+CRITERIA = 'Adapter should work in correct states.'
+ATTRIBUTES = 'suite:bluetooth_floss'
+TIME = 'SHORT'
+TEST_CATEGORY = 'Functional'
+TEST_CLASS = 'bluetooth'
+TEST_TYPE = 'server'
+DEPENDENCIES = 'bluetooth, working_bluetooth_btpeer:1'
+PY_VERSION = 3
+
+DOC = """
+Verify that the bluetooth adapter of the DUT could pair and connect
+to a bluetooth device.
+
+Specifically, the following subtests are executed in this autotest.
+ - test_reset_on_adapter
+ - test_pairable
+ - test_discover_device
+ - test_stop_discovery
+ - test_device_name
+ - test_device_class_of_service
+ - test_device_class_of_device
+ - test_pairing
+ - test_connection_by_adapter
+ - test_disconnection_by_adapter
+ - test_connection_by_device
+ - test_disconnection_by_device
+ - test_remove_pairing
+"""
+
+args_dict = utils.args_to_dict(args)
+
+def run(machine):
+ host = hosts.create_host(machine)
+ job.run_test('bluetooth_AdapterCLHealth', host=host,
+ num_iterations=1, args_dict=args_dict,
+ test_name=NAME.split('.')[1], floss=True)
+
+parallel_simple(run, machines)
diff --git a/server/site_tests/bluetooth_AdapterCLHealth/control.cl_connect_disconnect_by_device_loop_test.floss b/server/site_tests/bluetooth_AdapterCLHealth/control.cl_connect_disconnect_by_device_loop_test.floss
new file mode 100644
index 0000000000..2f681aa2b6
--- /dev/null
+++ b/server/site_tests/bluetooth_AdapterCLHealth/control.cl_connect_disconnect_by_device_loop_test.floss
@@ -0,0 +1,48 @@
+# Copyright 2022 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from autotest_lib.server import utils
+
+AUTHOR = 'chromeos-bluetooth'
+NAME = 'bluetooth_AdapterCLHealth.cl_connect_disconnect_by_device_loop_test.floss'
+PURPOSE = ('Batch of Bluetooth CL health tests')
+CRITERIA = 'Pass all health test'
+# TODO: Remove ['Quick Health'] flag from AdapterCLHealth when moving to stable.
+ATTRIBUTES = 'suite:bluetooth_floss'
+TIME = 'MEDIUM'
+TEST_CATEGORY = 'Functional'
+TEST_CLASS = 'bluetooth'
+TEST_TYPE = 'server'
+DEPENDENCIES = 'bluetooth, working_bluetooth_btpeer:1'
+PY_VERSION = 3
+
+DOC = """ Tests connection and disconnection by the device in a loop.
+
+Specifically, the following subtests are executed in this autotest.
+ - test_reset_on_adapter
+ - test_pairable
+ - test_discover_device
+ - test_pairing
+ - test_device_is_connected
+ - test_hid_device_created
+ - test_device_set_discoverable
+ - test_disconnection_by_device
+ - iteration start
+ - test_device_is_not_connected
+ - test_connection_by_device
+ - check_connected_method
+ - test_disconnection_by_device
+ - iteration end
+ - test_remove_pairing
+"""
+
+args_dict = utils.args_to_dict(args)
+
+def run(machine):
+ host = hosts.create_host(machine)
+ job.run_test('bluetooth_AdapterCLHealth', host=host,
+ num_iterations=1, args_dict=args_dict,
+ test_name=NAME.split('.')[1], floss=True)
+
+parallel_simple(run, machines)
diff --git a/server/site_tests/bluetooth_AdapterCLHealth/control.cl_connect_disconnect_loop_test.floss b/server/site_tests/bluetooth_AdapterCLHealth/control.cl_connect_disconnect_loop_test.floss
new file mode 100644
index 0000000000..3e9b4ac624
--- /dev/null
+++ b/server/site_tests/bluetooth_AdapterCLHealth/control.cl_connect_disconnect_loop_test.floss
@@ -0,0 +1,32 @@
+# Copyright 2022 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from autotest_lib.server import utils
+
+AUTHOR = 'chromeos-bluetooth'
+NAME = 'bluetooth_AdapterCLHealth.cl_connect_disconnect_loop_test.floss'
+PURPOSE = 'Test bluetooth adapter connect to HID after disconnecting'
+CRITERIA = 'Adapter should work in correct states.'
+ATTRIBUTES = 'suite:bluetooth_floss'
+TIME = 'SHORT'
+TEST_CATEGORY = 'Functional'
+TEST_CLASS = 'bluetooth'
+TEST_TYPE = 'server'
+DEPENDENCIES = 'bluetooth, working_bluetooth_btpeer:1'
+PY_VERSION = 3
+
+DOC = """
+Verify that the bluetooth adapter of the DUT could pair and connect
+to a bluetooth device.
+"""
+
+args_dict = utils.args_to_dict(args)
+
+def run(machine):
+ host = hosts.create_host(machine)
+ job.run_test('bluetooth_AdapterCLHealth', host=host,
+ num_iterations=1, args_dict=args_dict,
+ test_name=NAME.split('.')[1], floss=True)
+
+parallel_simple(run, machines)