| # Copyright 2021 The Chromium OS Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| from autotest_lib.server import utils |
| |
| AUTHOR = "Ambalavanan M M <ambalavanan.m.m@intel.com>" |
| NAME = "system_CheckPeripheralsDetection.suspend_resume_gold" |
| PURPOSE = "Shut down DUT, then initiate a suspend_resume and checks the " \ |
| "periperals connected to DUT" |
| ATTRIBUTES = "suite:stability_gold" |
| TIME = "SHORT" |
| TEST_CATEGORY = "Functional" |
| TEST_CLASS = "power" |
| TEST_TYPE = "server" |
| DEPENDENCIES = "servo" |
| DOC = """ |
| Verifies that suspend_resume work correctly and peripherals detection |
| |
| Devices need to be connected: |
| USB2.0 |
| USB3.0 |
| USB3.1 |
| SD_CARD |
| HDMI |
| |
| command to execute: |
| test_that -b $BOARD $DUT system_CheckPeripheralsDetection.suspend_resume_gold |
| """ |
| |
| args_dict = utils.args_to_dict(args) |
| servo_args = hosts.CrosHost.get_servo_arguments(args_dict) |
| |
| def run(machine): |
| host = hosts.create_host(machine, servo_args=servo_args) |
| job.run_test("system_CheckPeripheralsDetection", host=host, |
| iteration_count=100, action="suspend_resume") |
| |
| parallel_simple(run, machines) |