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 5from autotest_lib.server import utils 6 7AUTHOR = "coconutruben" 8NAME = "servo_USBMuxVerification" 9PURPOSE = "Validate the usb mux on servo can face both host and DUT." 10CRITERIA = "This test is a wrapper for a client test." 11TIME = "SHORT" 12TEST_CATEGORY = "Benchmark" 13TEST_CLASS = "servo" 14TEST_TYPE = "server" 15DEPENDENCIES = "servo" 16 17DOC = """ 18 19This test is to validate whether the usb stick on a (lab) servo device i.e. v2, 20v3, and v4, can switch properly between servo host and dut host. It simply 21checks that the stick becomes visible on the right side, given the mux state 22and power state of the port. 23 24Notes: 25- Test fails if the servo doesn't have an image usb port 26- Test fails if no usb block device with vid/pid/serial plugged into said port 27""" 28 29# Workaround to make it compatible with moblab autotest UI. 30global args_dict 31try: 32 args_dict 33except NameError: 34 args_dict = utils.args_to_dict(args) 35servo_args = hosts.CrosHost.get_servo_arguments(args_dict) 36 37def run(machine): 38 host = hosts.create_host(machine, servo_args=servo_args) 39 job.run_test("servo_USBMuxVerification", host=host) 40 41parallel_simple(run, machines) 42