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_FAFTSetup"
9PURPOSE = "Servo based diagnose of FAFT hardware setup"
10CRITERIA = "This test will fail if FAFT hardware is not set up correctly."
11ATTRIBUTES = "suite:faft, suite:faft_bios, suite:faft_lab, suite:faft_lv2, suite:faft_normal, suite:faft_bios_ec3po"
12SUITE = "faft,faft_bios,faft_normal,faft_lv2,faft_lab,faft_bios_ec3po"
13TIME = "SHORT"
14TEST_CATEGORY = "Functional"
15TEST_CLASS = "firmware"
16TEST_TYPE = "server"
17JOB_RETRIES = 4
18
19DOC = """
20This test checks the following FAFT hardware requirement:
21  - Warm reset
22  - Cold reset
23  - Recovery boot with USB stick
24  - USB stick is plugged into Servo board, not DUT
25  - Keyboard simulation
26
27If this test is run with parameter -a "spec_check=True", then hardware
28testability is checked according to spec and without any current
29workaround.
30  - Strict keyboard simulation
31  - Recovery mode with dedicated recovery signal
32"""
33
34args_dict = utils.args_to_dict(args)
35servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
36
37def run_faftsetup(machine):
38    host = hosts.create_host(machine, servo_args=servo_args)
39    job.run_test("firmware_FAFTSetup", host=host, cmdline_args=args,
40                 disable_sysinfo=True)
41
42parallel_simple(run_faftsetup, machines)
43