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