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_FWupdate" 7TIME = "MEDIUM" 8TEST_CATEGORY = "Functional" 9TEST_CLASS = "firmware" 10TEST_TYPE = "server" 11 12DOC = """ 13RO+RW firmware update using chromeos-firmwareupdate --mode=recovery 14or chromeos-firmwareupdate --mode=factory 15 16Example for servo V3: 17test_that --board=BOARD --args 'servo_host=SERVO3_IP new_ec=/path/to/ec.bin new_bios=/path/to/bios.bin' DUT_IP f:.*firmware_FWupdate/control 18 19Remove servo_host param for V2 servo. 20Default mode is recovery, add mode=factory to use factory mode. 21 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_FWupdate', host=host, cmdline_args=args) 33 34parallel_simple(run_firmwareupdate, machines) 35