• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2019 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_SetSerialNumber"
9PURPOSE = "Servo based test to set serial number in firmware."
10CRITERIA = """
11This test will fail if after setting the serial number in firmware:
12* The device is not in normal mode
13* The serial number is not set in VPD
14* Flash write protect is not enabled
15"""
16ATTRIBUTES = ""
17TIME = "SHORT"
18TEST_CATEGORY = "Functional"
19TEST_CLASS = "firmware"
20TEST_TYPE = "server"
21JOB_RETRIES = 1
22
23DOC = """
24Test that setting the serial number in firmware during an onsite RMA works.
25Mainboards for onsite RMA will have WP# asserted, flash WP bit cleared,
26the serial_number in VPD set to all spaces, and be in dev mode. After the
27serial number is set in firmware flash write protect will be enabled and
28the device will be in normal mode.
29"""
30
31args_dict = utils.args_to_dict(args)
32servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
33
34def run_SetSerialNumber(machine):
35    host = hosts.create_host(machine, servo_args=servo_args)
36    job.run_test("firmware_SetSerialNumber", host=host, cmdline_args=args,
37                 disable_sysinfo=True, tag="dev")
38
39parallel_simple(run_SetSerialNumber, machines)
40