1# Copyright 2014 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 6from autotest_lib.client.common_lib.cros.cfm.usb import cfm_usb_devices 7 8AUTHOR = "harpreet" 9NAME = "enterprise_CFM_USBPeripheralHotplugDetect.c920" 10TIME = "SHORT" 11TEST_CATEGORY = "Functional" 12TEST_CLASS = "enterprise" 13TEST_TYPE = "server" 14ATTRIBUTES = "suite:hotrod" 15DEPENDENCIES = "servo, c920" 16JOB_RETRIES = 3 17 18DOC = """ 19This test clears the TPM if necessary, kicks off a client side test that enrolls 20a device as a hotrod device and hotplugs USB peripherals. After hotplug, it 21checks and verifies that both CrOS and Hotrod see the same set of Audio / Video 22peripherals. Clears the TPM again before test exits. 23 24Client side part of the test uses telemetry to query for peripherals detected by 25the hotrod app. 26""" 27 28args_dict = utils.args_to_dict(args) 29servo_args = hosts.CrosHost.get_servo_arguments(args_dict) 30 31def run_test(machine): 32 host = hosts.create_host(machine, servo_args=servo_args) 33 peripherals_to_check = [ 34 cfm_usb_devices.JABRA_SPEAK_410, 35 cfm_usb_devices.HD_PRO_WEBCAM_C920 36 ] 37 job.run_test('enterprise_CFM_USBPeripheralHotplugDetect', host=host, 38 peripherals_to_check=peripherals_to_check, tag="c920") 39 40 41parallel_simple(run_test, machines) 42