xref: /aosp_15_r20/external/autotest/server/site_tests/provision_Cr50Update/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-lab-infrastructure"
6NAME = "provision_Cr50Update"
7PURPOSE = "Provision a system to the correct firmware version."
8TIME = "MEDIUM"
9TEST_CATEGORY = "System"
10TEST_CLASS = "provision"
11TEST_TYPE = "Server"
12DEPENDENCIES = "servo_state:WORKING,cr50-ro-keyid:prod"
13PY_VERSION = 3
14
15DOC = """
16This is a test used by the provision control segment in autoserv to set the
17cr50-version label of a host to the desired setting. This test attempts to
18reprogram the cr50 firmware and set the cr50 chip board id. Use the args
19from Cr50Test to specify the release image: release_ver, release_path, or
20the version saved in chromeos_cr50-QUAL_VERSION.
21
22@param release_path: local path to release image
23@param release_ver: release version 'RW/BID'
24@param cr50_dbg_image_path: local path to DBG image
25"""
26
27from autotest_lib.client.common_lib import utils
28
29if 'args_dict' not in locals():
30    args_dict = {}
31
32args_dict.update(utils.args_to_dict(args))
33servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
34
35def run(machine):
36    host = hosts.create_host(machine, servo_args=servo_args)
37    job.run_test('provision_Cr50Update', host=host, cmdline_args=args,
38                 full_args=args_dict)
39
40job.parallel_simple(run, machines)
41