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