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" 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" 13JOB_RETRIES = 0 14PY_VERSION = 3 15 16DOC = """ 17RO+RW firmware update using chromeos-firmwareupdate --mode=recovery --wp=0, then 18sleep and wake, then make sure the host responds and the flash contents 19don't change. 20 21Example: 22test_that --board=BOARD --args 'servo_host=SERVO_IP' DUT_IP firmware_FWupdateThenSleep 23""" 24 25from autotest_lib.client.common_lib import utils 26 27args_dict = utils.args_to_dict(args) 28servo_args = hosts.CrosHost.get_servo_arguments(args_dict) 29 30def run_firmwareupdate(machine): 31 # Setup the client machine. 32 host = hosts.create_host(machine, servo_args=servo_args) 33 job.run_test('firmware_FWupdateThenSleep', host=host, cmdline_args=args) 34 35parallel_simple(run_firmwareupdate, machines) 36