1# Copyright 2020 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 = "servo_Verification" 9PURPOSE = "Ensure a dut/servo pair provide required lab functionality." 10ATTRIBUTES = "suite:servo_verification" 11TIME = "MEDIUM" 12TEST_CATEGORY = "Benchmark" 13TEST_CLASS = "platform" 14TEST_TYPE = "server" 15 16DOC = """ 17This test is a wrapper around a few functionality tests surrounding servo, 18servod, and basic lab functionality. As this test is designed to test the 19labstation serving servod itself, instead of specific DUTs functionality, 20it should be independent of what DUT is on the other side. 21 22This is the dut/servo implementation of this test and this test simply runs 23the suite: 24- servo_lab 25 26This test will fail if no usb stick is attached to the servo setup. 27 28.local version assumes that there is an image already installed on the USB stick 29This allows the test to skip download times or avoid any devserver flakiness 30and can be used for local image validation. Just make sure the image on the 31stick is actually an image for the DUT that is connected. 32 33A note on failures: 34- Failures might occur if the test to install test images fails to query 35the right devserver. This will cause platform_InstallTestImage and the 36subsequent test to fail as well. This is a known issue when kicking it off 37from a workstation for example. (crbug.com/c/953113). 38 39Sample usage: 40test_that <dut ip> servo_Verification --args "servo_host=<labstation ip> 41 servo_port=<port on labstation>" 42""" 43 44# Workaround to make it compatible with moblab autotest UI. 45global args_dict 46try: 47 args_dict 48except NameError: 49 args_dict = utils.args_to_dict(args) 50servo_args = hosts.CrosHost.get_servo_arguments(args_dict) 51 52def run(machine): 53 host = hosts.create_host(machine, servo_args=servo_args) 54 job.run_test("servo_Verification", host=host, disable_sysinfo=True) 55 56parallel_simple(run, machines) 57