blob: 463d0606687b02fbc506695c4b87d5de24ac567e [file] [log] [blame]
# Copyright (c) 2016 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 = "Chrome OS Team"
NAME = "kernel_ExternalUsbPeripheralsDetectionTest.printer_epson"
PURPOSE = "Kernel USB detection test"
CRITERIA = "This test will fail if any of the actions or checks fail."
TEST_CATEGORY = "Functional"
TEST_CLASS = "platform, kernel"
TEST_TYPE = "server"
DEPENDENCIES = "servo_state:WORKING, usb_printer_epson"
DOC = """
This test uses servo to connect USB devices.
This test verifies if drivers are created for each USB device or not.
The test fails if
- if USB device is not detected in lsusb command
- if driver for USB device is not created
- USB detected peripherals are different than expected
- there is no servo board attached
USB peripherals plugged
- USB Epson XP-610 Series printer
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)
usb_checks = {
# Epson printer
str("lsusb") :
["04b8:089e Seiko Epson Corp."],
str("lsusb -v -d 04b8:089e") :
["iProduct.*EPSON XP-610 Series",
vendor_id_dict_control_file = {'04b8': 'Printer'}
job.run_test("kernel_ExternalUsbPeripheralsDetectionTest", host=host,
disable_sysinfo=True, usb_checks=usb_checks, tag="printer_epson",
parallel_simple(run, machines)