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_UpdateFirmwareDataKeyVersion" 9 PURPOSE = """ 10 Servo based firmware update test which check firmware datakey version. 11 """ 12 CRITERIA = """ 13 Prerequirement is as follow: 14 1.The fwid should matches shellball's (/usr/sbin/chromeos-firmwareupdate) fwid, 15 unless this test use a given shellball. 16 2. A USB disk should be plugged-in, which contains a Chrome OS test image. 17 18 This test will fail if following requrements are met: 19 1. fwid does not match shellball's (/usr/sbin/chromeos-firmwareupdate) fwid 20 2. Firmware datakey version does not match original datakey version. 21 """ 22 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" 23 TIME = "SHORT" 24 TEST_CATEGORY = "Functional" 25 TEST_CLASS = "firmware" 26 TEST_TYPE = "server" 27 28 DOC = """ 29 This test requires a USB test image plugged in. The firmware id 30 should matches fwid of shellball chromeos-firmwareupdate, or user can 31 provide a shellball to do this test. In this way, the client will be update 32 with the given shellball first. On runtime, this test modifies shellball 33 and runs autoupdate. Check firmware datakey version after boot with 34 firmware B, and then recover firmware A and B to original shellball. 35 """ 36 37 args_dict = utils.args_to_dict(args) 38 servo_args = hosts.CrosHost.get_servo_arguments(args_dict) 39 40 def run_updatefirmwaredatakeyversion(machine): 41 host = hosts.create_host(machine, servo_args=servo_args) 42 job.run_test("firmware_UpdateFirmwareDataKeyVersion", 43 host=host, cmdline_args=args, 44 disable_sysinfo=True) 45 46 parallel_simple(run_updatefirmwaredatakeyversion, machines) 47