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