xref: /aosp_15_r20/external/autotest/server/site_tests/firmware_Cr50CCDFirmwareUpdate/control (revision 9c5db1993ded3edbeafc8092d69fe5de2ee02df7)
1# Copyright 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 = "Cr50 FW team"
8NAME = "firmware_Cr50CCDFirmwareUpdate"
9PURPOSE = "Verify flashing firmware through ccd_cr50"
10ATTRIBUTES = "suite:faft_ccd, suite:faft_cr50_prepvt, suite:faft_cr50_pvt"
11# We mark TIME as 'FAST' intentionally to have this test scheduled later than
12# other tests (having longer TIME attribute) among the test suite.
13# This is to minimize a side-effect of this test failures on the rest of
14# scheduled tests.
15TIME = "FAST"
16TEST_TYPE = "server"
17DEPENDENCIES = "servo_state:WORKING"
18PY_VERSION = 3
19
20DOC = """
21This is a test to program both EC and AP firmware through ccd_cr50 device.
22
23If you intend to backup and restore the original firmware, then add
24'--args="backup_fw=True"' to your test_that command line.
25"""
26
27if 'args_dict' not in locals():
28    args_dict = {}
29
30args_dict.update(utils.args_to_dict(args))
31servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
32
33def run(machine):
34    host = hosts.create_host(machine, servo_args=servo_args)
35    fw_path = args_dict.get("fw_path", None)
36    job.run_test('firmware_Cr50CCDFirmwareUpdate', host=host, cmdline_args=args,
37                 full_args=args_dict, rw_only=False, fw_path=fw_path)
38
39parallel_simple(run, machines)
40