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