1# Copyright (c) 2020 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 = "aluo" 8NAME = "firmware_FAFTModeTransitions.rec_u" 9PURPOSE = "Test FAFT ability to switch from rec to another mode and back" 10CRITERIA = "This test will fail if FAFT can not switch from rec and back again." 11ATTRIBUTES = "suite:faft_smoke" 12DEPENDENCIES = "servo_state:WORKING, servo_usb_state:NORMAL" 13TIME = "MEDIUM" 14TEST_CATEGORY = "Functional" 15TEST_CLASS = "firmware" 16TEST_TYPE = "server" 17PY_VERSION = 3 18 19DOC = """ 20This test checks the following mode transitions: 21 - Transition from rec to normal and back. 22 - Transition from rec to dev and back. 23""" 24 25args_dict = utils.args_to_dict(args) 26servo_args = hosts.CrosHost.get_servo_arguments(args_dict) 27 28 29def run_faftmodetransitions(machine): 30 host = hosts.create_host(machine, servo_args=servo_args) 31 32 job.run_test( 33 "firmware_FAFTModeTransitions", 34 host=host, 35 cmdline_args=args, 36 disable_sysinfo=True, 37 mode_seq=["rec", "normal", "rec", "dev", "rec"]) 38 39 40parallel_simple(run_faftmodetransitions, machines) 41