1# Copyright 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 5from autotest_lib.server import utils 6 7AUTHOR = "Chrome OS Team" 8NAME = "firmware_ECRestoreFW" 9PURPOSE = "Verify the FW restoration capability even from a bad state." 10ATTRIBUTES = "" 11TIME = "MEDIUM" 12TEST_CATEGORY = "Functional" 13TEST_CLASS = "firmware" 14TEST_TYPE = "server" 15DEPENDENCIES = "ec:cros" 16 17DOC = """ 18This test flashes a wrong EC RW firmware and checks FW gets restored. 19 20If you want to have any specific fake board name (e.g. coral) to test against, 21add --args="board_as=coral" to test_that command line. 22""" 23 24if 'args_dict' not in locals(): 25 args_dict = {} 26 27args_dict.update(utils.args_to_dict(args)) 28servo_args = hosts.CrosHost.get_servo_arguments(args_dict) 29 30def run(machine): 31 host = hosts.create_host(machine, servo_args=servo_args) 32 job.run_test('firmware_ECRestoreFW', host=host, cmdline_args=args, 33 full_args=args_dict) 34 35parallel_simple(run, machines) 36