• 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_UpdateKernelVersion"
9PURPOSE = "Servo based kernel update test which checks the kernel version."
10CRITERIA = """
11This test will fail if one of the following conditions is met:
121. In Normal Mode.
132. After update, device restart with KERNEL A.
143. Kernel version does not increase after update.
154. After recovery, device can't successfully restart.
165. Kernel version does not recover to original version after recovery.
17"""
18ATTRIBUTES = "suite:faft_bios, suite:faft_bios_ro_qual, suite:faft_bios_rw_qual, suite:faft_dev, suite:faft_lv5, suite:faft_bios_ec3po, suite:faft_bios_tot, suite:faft_smoke"
19DEPENDENCIES = "servo_state:WORKING"
20TIME = "SHORT"
21TEST_CATEGORY = "Functional"
22TEST_CLASS = "firmware"
23TEST_TYPE = "server"
24JOB_RETRIES = 4
25
26DOC = """
27This test should run in developer mode. On runtime, this test modifies the
28kernel version of kernel b and modifies cgpt to reboot with kernel b. Check
29kernel version after reboot, and then recover kernel b version to original
30version. Here also tries to reboot with kernel b after recovery. If sccuess,
31reboot with kernel a.
32"""
33
34args_dict = utils.args_to_dict(args)
35servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
36
37def run_updatekernelversion(machine):
38    host = hosts.create_host(machine, servo_args=servo_args)
39    job.run_test("firmware_UpdateKernelVersion", host=host, cmdline_args=args,
40                 disable_sysinfo=True, dev_mode=True, tag="dev")
41
42parallel_simple(run_updatekernelversion, machines)
43