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_SessionStress"
9TIME = "LONG"
10TEST_CATEGORY = "Functional"
11TEST_CLASS = "enterprise"
12TEST_TYPE = "server"
13ATTRIBUTES = "suite:hotrod"
14JOB_RETRIES = 3
15
16DOC = """
17This test clears the TPM and enables the appropriate usb port on the servo
18before enrolling the device into CFM. Once the device in enrolled, it tries to
19stress test the device by repeatedly starting and ending new hangout sessions.
20This is repeated for the number of times defined below which can be overwritten
21by an arg passed via command propmt when run manually.
22"""
23
24args_dict = utils.args_to_dict(args)
25servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
26
27def run_test(machine):
28    host = hosts.create_host(machine, servo_args=servo_args)
29    repeat = int(args_dict.get('repeat', 100))
30
31    job.run_test('enterprise_CFM_SessionStress',
32                 host=host,
33                 repeat=repeat)
34
35
36parallel_simple(run_test, machines)
37