xref: /aosp_15_r20/external/autotest/server/site_tests/firmware_FWupdateThenSleep/control.wp (revision 9c5db1993ded3edbeafc8092d69fe5de2ee02df7)
1# Copyright (c) 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
5AUTHOR = "ChromeOS Team"
6NAME = "firmware_FWupdateThenSleep.wp"
7ATTRIBUTES = "suite:faft_bios_ro_qual, suite:faft_bios_rw_qual"
8DEPENDENCIES = "servo_state:WORKING"
9TIME = "MEDIUM"
10TEST_CATEGORY = "Functional"
11TEST_CLASS = "firmware"
12TEST_TYPE = "server"
13PY_VERSION = 3
14
15DOC = """
16RW firmware update using chromeos-firmwareupdate --mode=recovery --wp=1, then
17sleep and wake, then make sure the host responds and the flash contents
18don't change.
19
20Example:
21test_that --board=BOARD --args 'servo_host=SERVO_IP' DUT_IP firmware_FWupdateThenSleep.wp
22"""
23
24from autotest_lib.client.common_lib import utils
25
26args_dict = utils.args_to_dict(args)
27servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
28
29def run_firmwareupdate(machine):
30    # Setup the client machine.
31    host = hosts.create_host(machine, servo_args=servo_args)
32    job.run_test('firmware_FWupdateThenSleep', host=host, cmdline_args=args,
33                 wp=1)
34
35parallel_simple(run_firmwareupdate, machines)
36