• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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"
12ATTRIBUTES = "suite:servo_lab"
13TEST_CATEGORY = "Benchmark"
14TEST_CLASS = "servo"
15TEST_TYPE = "server"
16DEPENDENCIES = "servo_state:WORKING"
17
18DOC = """
19
20This test is to validate whether the usb stick on a (lab) servo device i.e. v2,
21v3, and v4, can switch properly between servo host and dut host. It simply
22checks that the stick becomes visible on the right side, given the mux state
23and power state of the port.
24
25Notes:
26- Test fails if the servo doesn't have an image usb port
27- Test fails if no usb block device with vid/pid/serial plugged into said port
28"""
29
30# Workaround to make it compatible with moblab autotest UI.
31global args_dict
32try:
33    args_dict
34except NameError:
35    args_dict = utils.args_to_dict(args)
36servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
37
38def run(machine):
39    host = hosts.create_host(machine, servo_args=servo_args)
40    job.run_test("servo_USBMuxVerification", host=host)
41
42parallel_simple(run, machines)
43