blob: b969670fab541d4c4d533ff24571b746d8474498 [file] [log] [blame]
# Copyright (c) 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 = "Chrome OS Team"
NAME = "firmware_SetSerialNumber"
PURPOSE = "Servo based test to set serial number in firmware."
This test will fail if after setting the serial number in firmware:
* The device is not in normal mode
* The serial number is not set in VPD
* Flash write protect is not enabled
TEST_CATEGORY = "Functional"
TEST_CLASS = "firmware"
TEST_TYPE = "server"
DOC = """
Test that setting the serial number in firmware during an onsite RMA works.
Mainboards for onsite RMA will have WP# asserted, flash WP bit cleared,
the serial_number in VPD set to all spaces, and be in dev mode. After the
serial number is set in firmware flash write protect will be enabled and
the device will be in normal mode.
args_dict = utils.args_to_dict(args)
servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
def run_SetSerialNumber(machine):
host = hosts.create_host(machine, servo_args=servo_args)
job.run_test("firmware_SetSerialNumber", host=host, cmdline_args=args,
disable_sysinfo=True, tag="dev")
parallel_simple(run_SetSerialNumber, machines)