blob: 3f44bde736858cf1ea272229f3d78b349fb812b3 [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 Tamdf6df512012-09-12 16:16:43 +080011SUITE = "faft,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)
30servo_host = args_dict.get('servo_host', 'localhost')
31servo_port = args_dict.get('servo_port', None)
32
Tom Wai-Hong Tam109f63c2011-12-08 14:58:27 +080033def run_devscreentimeout(machine):
Tom Wai-Hong Tam9233ebb2012-09-28 19:37:48 +080034 host = hosts.create_host(machine, servo_host=servo_host,
35 servo_port=servo_port)
Tom Wai-Hong Tam109f63c2011-12-08 14:58:27 +080036 job.run_test("firmware_DevScreenTimeout", host=host, cmdline_args=args,
Mike Trutye51d4362012-07-24 15:15:15 -050037 use_faft=True, disable_sysinfo=True,
Mike Truty106451b2012-07-25 10:28:47 -050038 dev_mode=True, tag="dev")
Tom Wai-Hong Tam109f63c2011-12-08 14:58:27 +080039
40parallel_simple(run_devscreentimeout, machines)