Home | History | Annotate | Download | only in enterprise_CFM_USBPeripheralHotplugDetect
      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 
      5 from autotest_lib.server import utils
      6 
      7 AUTHOR = "harpreet"
      8 NAME = "enterprise_CFM_USBPeripheralHotplugDetect.c930"
      9 TIME = "SHORT"
     10 TEST_CATEGORY = "Functional"
     11 TEST_CLASS = "enterprise"
     12 TEST_TYPE = "server"
     13 ATTRIBUTES = "suite:hotrod"
     14 DEPENDENCIES = "servo, c930"
     15 JOB_RETRIES = 3
     16 
     17 DOC = """
     18 This test clears the TPM if necessary, kicks off a client side test that enrolls
     19 a device as a hotrod device and hotplugs USB peripherals. After hotplug, it
     20 checks and verifies that both CrOS and Hotrod see the same set of Audio / Video
     21 peripherals. Clears the TPM again before test exits.
     22 
     23 Client side part of the test uses telemetry to query for peripherals detected by
     24 the hotrod app.
     25 """
     26 
     27 args_dict = utils.args_to_dict(args)
     28 servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
     29 
     30 def run_test(machine):
     31     host = hosts.create_host(machine, servo_args=servo_args)
     32     peripheral_whitelist_dict = {'0b0e:0412': 'Jabra SPEAK 410',
     33             '046d:0843': 'Logitech Webcam C930e (046d:0843)'}
     34     job.run_test('enterprise_CFM_USBPeripheralHotplugDetect', host=host,
     35             peripheral_whitelist_dict=peripheral_whitelist_dict, tag="c930")
     36 
     37 
     38 parallel_simple(run_test, machines)
     39