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