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. 4 from autotest_lib.server.cros.cfm.configurable_test.dsl import * 5 from autotest_lib.server import utils 6 7 AUTHOR = "kerl (a] google.com, chromeos-meetings (a] google.com" 8 NAME = "enterprise_CFM_LowLevelPeripheralTest.reboot_stress" 9 PURPOSE = "Stresses peripheral devices by repeatedly rebooting the DUT." 10 CRITERIA = ("Atrus,Mimo, and Huddly detectable as USB devices after reboot " 11 "and no crash files appear") 12 ATTRIBUTES = "suite:bluestreak" 13 TIME = "MEDIUM" 14 TEST_CATEGORY = "Stress" 15 TEST_TYPE = "server" 16 DEPENDENCIES="atrus,mimo,huddly" 17 18 DOC = """ 19 Repeatedly reboots the DUT and verifies that the Atrus device can be enumerated 20 after each reboot. 21 """ 22 23 cfm_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 42 args_dict = utils.args_to_dict(args) 43 servo_args = hosts.CrosHost.get_servo_arguments(args_dict) 44 def run_test(machine): 45 job.run_test("enterprise_CFM_LowLevelPeripheralTest", 46 cfm_test = cfm_test, 47 tag = 'reboot_stress', 48 host = hosts.create_host(machine, servo_args=servo_args)) 49 50 parallel_simple(run_test, machines) 51