1# Copyright (c) 2014 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 = "platform_ServoPowerStateController.USBPluggedin" 9PURPOSE = "Verify servo PowerStateController functions." 10CRITERIA = "This test will fail if servo does not work as expected." 11ATTRIBUTES = "suite:faft_bios, suite:faft_bios_ro_qual, suite:faft_bios_rw_qual, suite:faft_lv2, suite:faft_normal, suite:faft_bios_tot, suite:bvt-perbuild,suite:servo_lab, suite:labqual, suite:distributed_lab_qual_faft" 12DEPENDENCIES = "servo_state:WORKING" 13TIME = "LONG" 14TEST_CATEGORY = "Functional" 15TEST_CLASS = "platform" 16TEST_TYPE = "server" 17DEPENDENCIES = "servo_state:WORKING" 18PY_VERSION = 3 19 20DOC = """ 21The test specifically exercises all the state transitions from control.nousb, 22plus these additional transitions: 23 normal mode -> off 24 off -> normal mode boot with USB stick plugged in 25 normal mode -> off 26 off -> recovery mode boot from USB 27 recovery mode -> off 28 off -> normal mode 29 30Note also that this test requires a USB stick with a test image be plugged in to 31the servo's usbkey port. 32""" 33 34args_dict = utils.args_to_dict(args) 35servo_args = hosts.CrosHost.get_servo_arguments(args_dict) 36 37def run(machine): 38 host = hosts.create_host(machine, servo_args=servo_args) 39 job.run_test('platform_ServoPowerStateController', host=host, 40 usb_available=True) 41 42parallel_simple(run, machines) 43