Home | History | Annotate | Download | only in firmware_UpdateFirmwareVersion
      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 
      5 from autotest_lib.server import utils
      6 
      7 AUTHOR = "Chrome OS Team"
      8 NAME = "firmware_UpdateFirmwareVersion"
      9 PURPOSE = "Servo based firmware update test which checks the firmware version."
     10 CRITERIA = """
     11 Prerequirement is as follow:
     12 1. This test should run in normal mode.
     13 2. Fwid should match shellball's (/usr/sbin/chromeos-firmwareupdate) fwid,
     14    unless this test use a given shellball.
     15 3. A USB disk should be plugged-in, which contains a Chrome OS test image.
     16 
     17 This test will fail if one of the following conditions is met:
     18 1. Firmware update fails.
     19 2. After firmware update, device restart with firmware A.
     20 3. Firmware version does not increase after firmware update.
     21 4. Firmware version does not recover to original version after recovery.
     22 """
     23 ATTRIBUTES = "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"
     24 TIME = "SHORT"
     25 TEST_CATEGORY = "Functional"
     26 TEST_CLASS = "firmware"
     27 TEST_TYPE = "server"
     28 
     29 DOC = """
     30 This test requires a USB test image plugged in. The firmware id
     31 the current running firmware must matches the system shellball's, or user
     32 can provide a shellball to do this test. In this way, the client will be
     33 update with the given shellball first. On runtime, this test modifies the
     34 firmware version of the shellball and runs autoupdate. Check firmware
     35 version after boot with firmware B, and then recover firmware A and B to
     36 original shellball.
     37 """
     38 
     39 args_dict = utils.args_to_dict(args)
     40 servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
     41 
     42 def 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 
     47 parallel_simple(run_updatefirmwareversion, machines)
     48