blob: edc3101e51780f7799d54b4871b4129e6dbec21f [file] [log] [blame]
Mike Trutye51d4362012-07-24 15:15:15 -05001# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
Tom Wai-Hong Tam109f63c2011-12-08 14:58:27 +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 Tam109f63c2011-12-08 14:58:27 +08007AUTHOR = "Chrome OS Team"
8NAME = "firmware_DevScreenTimeout"
9PURPOSE = "Servo based developer firmware screen timeout test"
10CRITERIA = "This test will fail if the timeout period does not match our spec."
Tom Wai-Hong Tamc67bcc62012-11-01 17:39:27 +080011SUITE = "faft,faft_bios,faft_dev,faft_lv4"
Tom Wai-Hong Tam109f63c2011-12-08 14:58:27 +080012TIME = "LONG"
13TEST_CATEGORY = "Functional"
14TEST_CLASS = "firmware"
15TEST_TYPE = "server"
16
17DOC = """
18When booting in developer mode, the firmware shows a screen to warn user
19the disk image is not secured. If a user press Ctrl-D or a timeout reaches,
20it will boot to developer mode. This test is to verify the timeout period.
21
22This test tries to boot the system in developer mode twice.
23The first one will repeatly press Ctrl-D on booting in order to reduce
24the time on developer warning screen. The second one will do nothing and
25wait the developer screen timeout. The time difference of these two boots
26is close to the developer screen timeout.
27"""
28
Tom Wai-Hong Tam9233ebb2012-09-28 19:37:48 +080029args_dict = utils.args_to_dict(args)
J. Richard Barnette964fba02012-10-24 17:34:29 -070030servo_args = hosts.SiteHost.get_servo_arguments(args_dict)
Tom Wai-Hong Tam9233ebb2012-09-28 19:37:48 +080031
Tom Wai-Hong Tam109f63c2011-12-08 14:58:27 +080032def run_devscreentimeout(machine):
J. Richard Barnette964fba02012-10-24 17:34:29 -070033 host = hosts.create_host(machine, servo_args=servo_args)
Tom Wai-Hong Tam109f63c2011-12-08 14:58:27 +080034 job.run_test("firmware_DevScreenTimeout", host=host, cmdline_args=args,
Tom Wai-Hong Tamd6da7bf2012-11-13 15:49:39 +080035 use_faft=True, dev_mode=True, tag="dev")
Tom Wai-Hong Tam109f63c2011-12-08 14:58:27 +080036
37parallel_simple(run_devscreentimeout, machines)