| # Copyright (c) 2014 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 = "harpreet@google.com" |
| NAME = "kernel_ExternalUsbPeripheralsDetectionStress" |
| PURPOSE = "Kernel USB detection stress test" |
| CRITERIA = "This test will fail if any of the actions or checks fail." |
| TIME = "SHORT" |
| TEST_CATEGORY = "Functional" |
| TEST_CLASS = "platform, kernel" |
| TEST_TYPE = "server" |
| SUITE = "kernel_usb" |
| DEPENDENCIES = "servo, kernel_usb" |
| |
| DOC = """ |
| This test uses servo to connect USB devices. This test verifies if drivers are |
| created for each USB device. |
| |
| The test fails if |
| - USB device is not detected in lsusb command |
| - driver for USB device is not created |
| - USB detected peripherals are different than expected |
| - there is no servo board attached |
| |
| """ |
| |
| 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) |
| |
| loop_count = int(args_dict.get('iterations', 100)) |
| |
| job.run_test("kernel_ExternalUsbPeripheralsDetectionStress", host=host, |
| disable_sysinfo=True, loop_count=loop_count) |
| |
| parallel_simple(run, machines) |