xref: /aosp_15_r20/external/autotest/server/site_tests/firmware_FAFTModeTransitions/control.all_single (revision 9c5db1993ded3edbeafc8092d69fe5de2ee02df7)
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.all_single"
9PURPOSE = "Test FAFT ability to switch between different modes"
10CRITERIA = "This test will fail if FAFT can not switch between any two modes."
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 between any two modes (single transition)
22"""
23
24args_dict = utils.args_to_dict(args)
25servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
26
27
28def run_faftmodetransitions(machine):
29    host = hosts.create_host(machine, servo_args=servo_args)
30
31    job.run_test(
32            "firmware_FAFTModeTransitions",
33            host=host,
34            cmdline_args=args,
35            disable_sysinfo=True,
36            mode_seq=["normal", "dev", "rec", "normal", "rec", "dev", "normal"])
37
38
39parallel_simple(run_faftmodetransitions, machines)
40