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 (a] chromium.org" 8 NAME = "enterprise_CFM_VolumeChange.usb_speaker" 9 TIME = "SHORT" 10 TEST_CATEGORY = "Functional" 11 TEST_CLASS = "enterprise" 12 TEST_TYPE = "server" 13 ATTRIBUTES = "suite:hotrod" 14 DEPENDENCIES = "atrus, meet_app" 15 JOB_RETRIES = 3 16 17 DOC = """ 18 This test clears the TPM and enables the appropriate usb port on the servo 19 before kicking off a client side test that enrolls the device into CFM. Once 20 the device in enrolled, a different client test is kicked off to change the 21 hangouts volume using hotrod kiosk app JS hooks. These changes are then 22 validated against the cras_test_client output to make sure the volume matches. 23 """ 24 25 args_dict = utils.args_to_dict(args) 26 27 def run_test(machine): 28 host = hosts.create_host(machine) 29 repeat = int(args_dict.get('repeat', 10)) 30 cmd = "cras_test_client --dump_server_info | awk '/Output Nodes:/," \ 31 "/Input Devices:/' | grep -E 'USB' | awk -v N=3 '{print $N}'" 32 33 job.run_test('enterprise_CFM_VolumeChange', host=host, repeat=repeat, 34 cmd=cmd, tag="usb_speaker") 35 36 37 parallel_simple(run_test, machines) 38