• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2012 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_UpdateFirmwareVersion"
9PURPOSE = "Servo based firmware update test which checks the firmware version."
10CRITERIA = """
11Prerequirement is as follow:
121. This test should run in normal mode.
132. Fwid should match shellball's (/usr/sbin/chromeos-firmwareupdate) fwid,
14   unless this test use a given shellball.
153. A USB disk should be plugged-in, which contains a Chrome OS test image.
16
17This test will fail if one of the following conditions is met:
181. Firmware update fails.
192. After firmware update, device restart with firmware A.
203. Firmware version does not increase after firmware update.
214. Firmware version does not recover to original version after recovery.
22"""
23ATTRIBUTES = "suite:faft, suite:faft_bios, suite:faft_bios_au_1, suite:faft_bios_au_2, suite:faft_bios_au_3, suite:faft_normal, suite:faft_lv5, suite:faft_bios_ec3po, suite:faft_bios_tot"
24TIME = "SHORT"
25TEST_CATEGORY = "Functional"
26TEST_CLASS = "firmware"
27TEST_TYPE = "server"
28
29DOC = """
30This test requires a USB test image plugged in. The firmware id
31the current running firmware must matches the system shellball's, or user
32can provide a shellball to do this test. In this way, the client will be
33update with the given shellball first. On runtime, this test modifies the
34firmware version of the shellball and runs autoupdate. Check firmware
35version after boot with firmware B, and then recover firmware A and B to
36original shellball.
37"""
38
39args_dict = utils.args_to_dict(args)
40servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
41
42def run_updatefirmwareversion(machine):
43    host = hosts.create_host(machine, servo_args=servo_args)
44    job.run_test("firmware_UpdateFirmwareVersion", host=host, cmdline_args=args,
45                 disable_sysinfo=True)
46
47parallel_simple(run_updatefirmwareversion, machines)
48