Home | History | Annotate | Download | only in power_USBHotplugInSuspend
      1 # Copyright (c) 2013 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 from autotest_lib.server import utils
      6 
      7 AUTHOR = "abrestic, tbroch"
      8 NAME = "power_USBHotplugInSuspend"
      9 PURPOSE = "Tests USB hot-plugging during suspend."
     10 CRITERIA = "Fails if hotplug of a USB device during suspend is not detected."
     11 TIME = "SHORT"
     12 TEST_CATEGORY = "Functional"
     13 TEST_CLASS = "power"
     14 TEST_TYPE = "server"
     15 DEPENDENCIES = "servo"
     16 
     17 DOC = """
     18 This tests both hotplug insertion and removal of a USB device while the DUT
     19 is suspended.  The DUT is suspended using the client test power_KernelSuspend.
     20 Servo is then used to power on/off the USB key.  After the client resumes, it
     21 should detect the change.
     22 """
     23 
     24 args_dict = utils.args_to_dict(args)
     25 servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
     26 
     27 def run(machine):
     28     host = hosts.create_host(machine, servo_args=servo_args)
     29     job.run_test("power_USBHotplugInSuspend", host=host)
     30 
     31 parallel_simple(run, machines)
     32