blob: d81eb9d64734b09a35b4abfb9a4d3afe623e3dfc [file] [log] [blame]
Mike Trutye51d4362012-07-24 15:15:15 -05001# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
Tom Wai-Hong Tam48958832011-12-30 10:16:57 +08002# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
Tom Wai-Hong Tam9233ebb2012-09-28 19:37:48 +08005from autotest_lib.server import utils
6
Tom Wai-Hong Tam48958832011-12-30 10:16:57 +08007AUTHOR = "Chrome OS Team"
8NAME = "firmware_CgptState"
9PURPOSE = "Servo based executing the CgptState test on client side."
10CRITERIA = "This test will fail if cgpt mis-behaves"
Tom Wai-Hong Tamc67bcc62012-11-01 17:39:27 +080011SUITE = "faft,faft_bios,faft_normal,faft_lv4"
Tom Wai-Hong Tamf6367522013-01-23 09:44:56 +080012TIME = "SHORT"
Tom Wai-Hong Tam48958832011-12-30 10:16:57 +080013TEST_CATEGORY = "Functional"
14TEST_CLASS = "firmware"
15TEST_TYPE = "server"
16
17DOC = """
18This test triggers the CgptState test on client side. In the client
19CgptState test, it set kernels A and B with different cgpt states
20(priority, tries, successful) and checks their boot results.
21
22The test items and logic are now handled in client. This FAFT test
23just handles the reboot logic.
24See /usr/local/sbin/firmware/saft/cgpt_state.py for more detail.
25"""
26
Tom Wai-Hong Tam9233ebb2012-09-28 19:37:48 +080027args_dict = utils.args_to_dict(args)
Fang Deng0ca40e22013-08-27 17:47:44 -070028servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
Tom Wai-Hong Tam9233ebb2012-09-28 19:37:48 +080029
Tom Wai-Hong Tam48958832011-12-30 10:16:57 +080030def run_cgptstate(machine):
J. Richard Barnette964fba02012-10-24 17:34:29 -070031 host = hosts.create_host(machine, servo_args=servo_args)
Tom Wai-Hong Tam48958832011-12-30 10:16:57 +080032 job.run_test("firmware_CgptState", host=host, cmdline_args=args,
Tom Wai-Hong Tam54f4c582013-07-18 12:05:27 +080033 disable_sysinfo=True, dev_mode=False, tag="normal")
Tom Wai-Hong Tam48958832011-12-30 10:16:57 +080034
35parallel_simple(run_cgptstate, machines)