xref: /aosp_15_r20/external/autotest/server/site_tests/firmware_ChipFwUpdate/control (revision 9c5db1993ded3edbeafc8092d69fe5de2ee02df7)
1# Copyright 2017 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
5AUTHOR = "ChromeOS Team"
6NAME = "firmware_ChipFwUpdate"
7PURPOSE = "TCPC firmware update test."
8CRITERIA = "This test will pass if the updated bios.bin booted successfully."
9DEPENDENCIES = "servo_state:WORKING"
10TIME = "SHORT"
11TEST_CATEGORY = "Functional"
12TEST_CLASS = "firmware"
13TEST_TYPE = "server"
14JOB_RETRIES = 0
15PY_VERSION = 3
16
17DOC = """
18This test replaces chip (i.e. TCPC) firmware on the DUT's bios.bin
19and reboots into it.  The expectation is that the TCPC firmware
20is updated correctly when the system boots with the updated bios.bin
21
22Software sync applies the TCPC firmware update and verifies that
23it has been applied.  If the DUT rebooted successfully, we know
24that the test has passed.
25
26For independent verification, the firmware_CompareChipFwToShellBall
27FAFT test can be used to verify the running TCPC firmware versions.
28
29For complete testing, this test needs to be invoked to downgrade, then
30upgrade the TCPCs so that we have confidence that the update process
31really happened.
32"""
33
34from autotest_lib.client.common_lib import utils
35
36args_dict = utils.args_to_dict(args)
37servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
38
39def run_chip_fw_update(machine):
40    # Setup the client machine.
41    host = hosts.create_host(machine, servo_args=servo_args)
42    job.run_test('firmware_ChipFwUpdate',
43                 host=host, cmdline_args=args)
44
45
46parallel_simple(run_chip_fw_update, machines)
47