blob: 0c34c4feeb602e1ab894f94cf8d73749579639aa [file] [log] [blame]
# Copyright 2019 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from autotest_lib.server import utils
AUTHOR = "The Chromium OS Authors"
NAME = "firmware_WilcoDiagnosticsMode"
PURPOSE = "Verify that AP firmware handles a corrupt Wilco diagnostics binary and applies updates to it"
ATTRIBUTES = "suite:faft_wilco, suite:faft_bios, suite:faft_bios_ro_qual, suite:faft_bios_rw_qual"
TIME = "MEDIUM"
TEST_TYPE = "server"
DEPENDENCIES = "servo_state:WORKING, board:sarien"
JOB_RETRIES = 0
DOC = """Corrupt the Wilco diagnostics image and then reinstall it.
Wilco supports entry into a diagnostics image from recovery mode. The image is
stored in the RW_LEGACY firmware section and updated during AP firmware updates.
Entry into the image should fail if the image is corrupted. Updating the
firmware should restore the diagnostics image.
"""
if 'args_dict' not in locals():
args_dict = {}
args_dict.update(utils.args_to_dict(args))
servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
def run(machine):
host = hosts.create_host(machine, servo_args=servo_args)
iterations = int(args_dict.get("iterations", 1))
job.run_test("firmware_WilcoDiagnosticsMode", host=host,
cmdline_args=args, full_args=args_dict, iterations=iterations)
parallel_simple(run, machines)