| # Copyright 2023 The ChromiumOS Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| from autotest_lib.client.common_lib import utils |
| from autotest_lib.server.site_tests.tast import tast |
| import autotest_lib.server.cros.bluetooth.bluetooth_control_file_utils as bt_control_utils |
| |
| AUTHOR = 'ChromiumOS team' |
| NAME = 'tast.bluetooth_cross_device' |
| TIME = 'MEDIUM' |
| TEST_TYPE = 'Server' |
| ATTRIBUTES = 'suite:bluetooth_cross_device' |
| MAX_RESULT_SIZE_KB = 1024 * 1024 |
| PY_VERSION = 3 |
| REQUIRE_SSP = True |
| |
| METADATA = { |
| 'contacts': ['chromeos-bt-team@google.com',"chromeos-cross-device-eng@google.com",'chromeos-connectivity-engprod@google.com'], |
| 'bug_component': 'b:167317', |
| 'criteria': ('Bluetooth tests that need multi-dut test beds'), |
| 'hw_agnostic': False, |
| } |
| |
| # tast.py uses binaries installed from autotest_server_package.tar.bz2. |
| REQUIRE_SSP = True |
| |
| DOC = '''Run the Tast Cross Device Bluetooth test suite.''' |
| |
| # |
| # Currently only Fast pair test are present in this suite and these |
| # tests do not use the Android phone in the testbed, only the DUTs and |
| # the btpeer |
| # |
| |
| command_args, varslist = tast.split_arguments(args) |
| args_dict = utils.args_to_dict(args) |
| servo_args = hosts.CrosHost.get_servo_arguments(args_dict) |
| |
| def run(machine): |
| |
| host = hosts.create_host(machine, servo_args=servo_args) |
| companions = hosts.create_companion_hosts(companion_hosts) |
| # Currently the bluetooth peer in multi-dut testbeds are not added to UFS, hence |
| # there is no need to add number of peer to the expression. |
| tast_test_expr = '("group:bluetooth" && bluetooth_cross_device_fastpair_multidut)' |
| |
| job.run_test('tast', |
| host=host, |
| test_exprs=[tast_test_expr], |
| ignore_test_failures=True, |
| max_run_sec=10800, |
| companion_duts={'cd1':companions[0]}, |
| command_args=args, |
| varslist=varslist) |
| parallel_simple(run, machines) |