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 = "coconutruben"
8NAME = "servo_LogGrab"
9PURPOSE = "Validate ServoHost grabs all the right logs on the labstation."
10TIME = "SHORT"
11ATTRIBUTES = "suite:servo_lab"
12CRITERIA="Run on DUT with a servo attached and a functional DUT on the servo."
13TEST_CATEGORY = "Functional"
14TEST_CLASS = "servo"
15TEST_TYPE = "server"
16
17DOC = """
18
19This test uses a servo host to make sure that servo.py's grab_logs
20- grabs all logs pertaining to one instance (even if more than one)
21- properly decompresses logs if some of those logs were compressed.
22"""
23
24# Workaround to make it compatible with moblab autotest UI.
25global args_dict
26try:
27    args_dict
28except NameError:
29    args_dict = utils.args_to_dict(args)
30servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
31
32def run(machine):
33    host = hosts.create_host(machine, servo_args=servo_args)
34    job.run_test("servo_LogGrab", host=host, disable_sysinfo=True)
35
36parallel_simple(run, machines)
37