• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
5from autotest_lib.server import utils
6
7AUTHOR = "harpreet@chromium.org"
8NAME = "enterprise_CFM_VolumeChange.usb_speaker"
9TIME = "SHORT"
10TEST_CATEGORY = "Functional"
11TEST_CLASS = "enterprise"
12TEST_TYPE = "server"
13ATTRIBUTES = "suite:hotrod"
14DEPENDENCIES = "atrus, meet_app"
15JOB_RETRIES = 3
16
17DOC = """
18This test clears the TPM and enables the appropriate usb port on the servo
19before kicking off a client side test that enrolls the device into CFM. Once
20the device in enrolled, a different client test is kicked off to change the
21hangouts volume using hotrod kiosk app JS hooks. These changes are then
22validated against the cras_test_client output to make sure the volume matches.
23"""
24
25args_dict = utils.args_to_dict(args)
26
27def 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
37parallel_simple(run_test, machines)
38