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 5 AUTHOR = "Chrome OS Team" 6 NAME = "firmware_FWupdate" 7 TIME = "MEDIUM" 8 TEST_CATEGORY = "Functional" 9 TEST_CLASS = "firmware" 10 TEST_TYPE = "server" 11 12 DOC = """ 13 RO+RW firmware update using chromeos-firmwareupdate --mode=recovery 14 or chromeos-firmwareupdate --mode=factory 15 16 Example for servo V3: 17 test_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 19 Remove servo_host param for V2 servo. 20 Default mode is recovery, add mode=factory to use factory mode. 21 22 """ 23 24 from autotest_lib.client.common_lib import utils 25 26 args_dict = utils.args_to_dict(args) 27 servo_args = hosts.CrosHost.get_servo_arguments(args_dict) 28 29 def 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 34 parallel_simple(run_firmwareupdate, machines) 35