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_FWupdateWP" 7DEPENDENCIES = "servo_state:WORKING" 8TIME = "MEDIUM" 9TEST_CATEGORY = "Functional" 10TEST_CLASS = "firmware" 11TEST_TYPE = "server" 12JOB_RETRIES = 0 13PY_VERSION = 3 14 15DOC = """ 16RO+RW firmware update using chromeos-firmwareupdate --mode=recovery 17 18Example for servo V3: 19test_that --board=BOARD --args 'servo_host=SERVO3_IP' DUT_IP firmware_FWupdateWP 20 21Remove servo_host param for V2 servo. 22Default mode is recovery, add mode=factory to use factory mode. 23 24Note that the test modifies FWIDs, then restores them. If the test dies in a way 25that doesn't run cleanup, then they will be left modified. 26In that case, you may want to reflash the firmware to undo the changes. 27 28""" 29 30from autotest_lib.client.common_lib import utils 31 32args_dict = utils.args_to_dict(args) 33servo_args = hosts.CrosHost.get_servo_arguments(args_dict) 34 35def run_firmwareupdate(machine): 36 # Setup the client machine. 37 host = hosts.create_host(machine, servo_args=servo_args) 38 job.run_test('firmware_FWupdateWP', host=host, cmdline_args=args) 39 40parallel_simple(run_firmwareupdate, machines) 41