| # Copyright 2022 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.server import utils |
| |
| NAME = 'infra_MultiDutsWithAndroid.local' |
| METADATA = { |
| "contacts": ["peep-fleet-infra-sw@google.com"], |
| "bug_component": "b:1121531", |
| "criteria": "Sample test for cross device tests with Android devices.", |
| } |
| TEST_TYPE = 'server' |
| |
| """ |
| The local version of infra_MultiDutsWithAndroid. Local in this context means |
| run from a local autotest checkout(e.g. test_that), where the autoserv doesn't |
| have access to host_info_store data read from fleet inventory. |
| |
| For more details, please see the DOC section in the file 'control'. |
| |
| Below args are expect to be added to test run: |
| --args="phone_station=$PHONE_HOST android_serial=$ANDROID_SERIAL_NUMBER" |
| |
| When use port forwarding to locahost, the expect args are: |
| --args="phone_station=locahost android_station_ssh_port=$FORWARDED_PORT android_serial=$ANDROID_SERIAL_NUMBER" |
| """ |
| |
| args_dict = utils.args_to_dict(args) |
| android_args = hosts.AndroidHost.get_android_arguments(args_dict) |
| |
| def run(machine): |
| host = hosts.create_host(machine) |
| companions = [hosts.AndroidHost('local_phone', android_args=android_args)] |
| job.run_test('infra_MultiDutsWithAndroid', host=host, companions=companions) |
| |
| parallel_simple(run, machines) |