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