xref: /aosp_15_r20/external/autotest/server/site_tests/firmware_FWupdate/control (revision 9c5db1993ded3edbeafc8092d69fe5de2ee02df7)
1# Copyright (c) 2014 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_FWupdate"
7TIME = "MEDIUM"
8TEST_CATEGORY = "Functional"
9TEST_CLASS = "firmware"
10TEST_TYPE = "server"
11DEPENDENCIES = "servo_state:WORKING"
12JOB_RETRIES = 0
13PY_VERSION = 3
14
15DOC = """
16RO+RW firmware update using chromeos-firmwareupdate --mode=recovery
17
18Required arguments:
19    test_that ... --args "old_bios=/path/to/old.bin \
20                          new_bios=/path/to/new.bin \
21                          servo_host=my_servo_host \
22                          servo_port=my_servo_port"
23
24The *_bios arguments can also be split into separate _bios_ro and _bios_rw args.
25"""
26
27from autotest_lib.client.common_lib import utils
28
29args_dict = utils.args_to_dict(args)
30servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
31
32def run_firmwareupdate(machine):
33    # Setup the client machine.
34    host = hosts.create_host(machine, servo_args=servo_args)
35    job.run_test('firmware_FWupdate', test_name=NAME, host=host,
36                 cmdline_args=args)
37
38parallel_simple(run_firmwareupdate, machines)
39