• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2018 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.
4from autotest_lib.server.cros.cfm.configurable_test.dsl import *
5from autotest_lib.server import utils
6
7AUTHOR = "kerl@google.com, chromeos-meetings@google.com"
8NAME = "enterprise_CFM_LowLevelPeripheralTest.reboot_stress"
9PURPOSE = "Stresses peripheral devices by repeatedly rebooting the DUT."
10CRITERIA = ("Atrus,Mimo, and Huddly detectable as USB devices after reboot "
11            "and no crash files appear")
12ATTRIBUTES = "suite:hotrod-remora"
13TIME = "MEDIUM"
14TEST_CATEGORY = "Stress"
15TEST_TYPE = "server"
16DEPENDENCIES="atrus,mimo,huddly"
17
18DOC = """
19Repeatedly reboots the DUT and verifies that the Atrus device can be enumerated
20after each reboot.
21"""
22
23cfm_test = CfmTest(
24    configuration=Configuration(skip_enrollment=True),
25    scenario=Scenario(
26        AssertUsbDevices([ATRUS]),
27        AssertUsbDevices(ALL_MIMO_DISPLAYS),
28        AssertUsbDevices([HUDDLY_GO]),
29        RepeatTimes(10, Scenario(
30            RebootDut(),
31            AssertUsbDevices([ATRUS]),
32            AssertUsbDevices(ALL_MIMO_DISPLAYS),
33            AssertUsbDevices([HUDDLY_GO]),
34            # TODO(crbug.com/814775): mosys-info always crashes on reboot, why
35            # we always have new crash files. Enable this check when that is
36            # fixed.
37            # AssertNoNewCrashes()
38        ))
39    ),
40)
41
42def run_test(machine):
43    job.run_test("enterprise_CFM_LowLevelPeripheralTest",
44                 cfm_test = cfm_test,
45                 tag = 'reboot_stress',
46                 host = hosts.create_host(machine))
47
48parallel_simple(run_test, machines)
49