1 # Copyright 2016 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 from autotest_lib.server import utils 6 7 AUTHOR = "harpreet" 8 NAME = "enterprise_CFM_USBPeripheralHotplugStress.c920" 9 TIME = "SHORT" 10 TEST_CATEGORY = "Functional" 11 TEST_CLASS = "enterprise" 12 TEST_TYPE = "server" 13 ATTRIBUTES = "suite:hotrod" 14 DEPENDENCIES = "servo, c920_hotplug_stress" 15 JOB_RETRIES = 3 16 17 DOC = """ 18 This test clears the TPM, enrolls the device into hotrod kiosk mode before 19 stress testing the hotplugging and unplugging of USB peripherals. With each 20 hotplug / unplug it verifies that the hotrod app appropriately detects the 21 peripherals using app api's. 22 """ 23 24 args_dict = utils.args_to_dict(args) 25 servo_args = hosts.CrosHost.get_servo_arguments(args_dict) 26 27 def run_test(machine): 28 host = hosts.create_host(machine, servo_args=servo_args) 29 repeat = int(args_dict.get('repeat', 10)) 30 peripheral_whitelist_dict = {'Camera': 'HD Pro Webcam C920 (046d:082d)'} 31 job.run_test('enterprise_CFM_USBPeripheralHotplugStress', 32 host=host, 33 repeat=repeat, 34 peripheral_whitelist_dict=peripheral_whitelist_dict, 35 tag="c920") 36 37 38 parallel_simple(run_test, machines) 39