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