xref: /aosp_15_r20/external/autotest/server/site_tests/firmware_UpdateKernelVersion/control (revision 9c5db1993ded3edbeafc8092d69fe5de2ee02df7)
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 = "ChromeOS 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_tot, suite:faft_smoke"
19DEPENDENCIES = "servo_state:WORKING"
20TIME = "SHORT"
21TEST_CATEGORY = "Functional"
22TEST_CLASS = "firmware"
23TEST_TYPE = "server"
24JOB_RETRIES = 0
25PY_VERSION = 3
26
27DOC = """
28This test should run in developer mode. On runtime, this test modifies the
29kernel version of kernel b and modifies cgpt to reboot with kernel b. Check
30kernel version after reboot, and then recover kernel b version to original
31version. Here also tries to reboot with kernel b after recovery. If sccuess,
32reboot with kernel a.
33"""
34
35args_dict = utils.args_to_dict(args)
36servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
37
38def run_updatekernelversion(machine):
39    host = hosts.create_host(machine, servo_args=servo_args)
40    job.run_test("firmware_UpdateKernelVersion", host=host, cmdline_args=args,
41                 disable_sysinfo=True, dev_mode=True, tag="dev")
42
43parallel_simple(run_updatekernelversion, machines)
44