xref: /aosp_15_r20/external/autotest/server/site_tests/servo_USBMuxVerification/control (revision 9c5db1993ded3edbeafc8092d69fe5de2ee02df7)
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# TEST SOON TO BE DISABLED UNTIL MIGRATED TO PYTHON 3.
6# For instructions on how to: go/tauto-py3-migration
7# To re-enable migrate to Python 3.
8# If the test is not migrated by 1/14/22 it will be deleted.
9
10from autotest_lib.server import utils
11
12AUTHOR = "coconutruben"
13NAME = "servo_USBMuxVerification"
14PURPOSE = "Validate the usb mux on servo can face both host and DUT."
15CRITERIA = "This test is a wrapper for a client test."
16TIME = "SHORT"
17ATTRIBUTES = "suite:servo_lab"
18TEST_CATEGORY = "Benchmark"
19TEST_CLASS = "servo"
20TEST_TYPE = "server"
21DEPENDENCIES = "servo_state:WORKING"
22PY_VERSION = 3
23
24DOC = """
25
26This test is to validate whether the usb stick on a (lab) servo device i.e. v2,
27v3, and v4, can switch properly between servo host and dut host. It simply
28checks that the stick becomes visible on the right side, given the mux state
29and power state of the port.
30
31Notes:
32- Test fails if the servo doesn't have an image usb port
33- Test fails if no usb block device with vid/pid/serial plugged into said port
34"""
35
36# Workaround to make it compatible with moblab autotest UI.
37global args_dict
38try:
39    args_dict
40except NameError:
41    args_dict = utils.args_to_dict(args)
42servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
43
44def run(machine):
45    host = hosts.create_host(machine, servo_args=servo_args)
46    job.run_test("servo_USBMuxVerification", host=host)
47
48parallel_simple(run, machines)
49