xref: /aosp_15_r20/external/autotest/server/site_tests/infra_MultiDutsWithAndroid/control.local (revision 9c5db1993ded3edbeafc8092d69fe5de2ee02df7)
1# Copyright 2022 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
5from autotest_lib.server import utils
6
7AUTHOR = 'xianuowang'
8NAME = 'infra_MultiDutsWithAndroid.local'
9TIME = 'SHORT'
10TEST_CATEGORY = 'General'
11TEST_CLASS = 'stub'
12TEST_TYPE = 'server'
13PY_VERSION = 3
14DOC = """
15The local version of infra_MultiDutsWithAndroid. Local in this context means
16run from a local autotest checkout(e.g. test_that), where the autoserv doesn't
17have access to host_info_store data read from fleet inventory.
18
19For more details, please see the DOC section in the file 'control'.
20
21Below args are expect to be added to test run:
22--args="phone_station=$PHONE_HOST android_serial=$ANDROID_SERIAL_NUMBER"
23
24When use port forwarding to locahost, the expect args are:
25--args="phone_station=locahost android_station_ssh_port=$FORWARDED_PORT android_serial=$ANDROID_SERIAL_NUMBER"
26"""
27
28args_dict = utils.args_to_dict(args)
29android_args = hosts.AndroidHost.get_android_arguments(args_dict)
30
31def run(machine):
32    host = hosts.create_host(machine)
33    companions = [hosts.AndroidHost('local_phone', android_args=android_args)]
34    job.run_test('infra_MultiDutsWithAndroid', host=host, companions=companions)
35
36parallel_simple(run, machines)