1# Copyright 2019 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 = "mqg" 8NAME = "power_ServoChargeStress.100loops" 9PURPOSE = "Stress test Servo changing PD role" 10TIME = "LONG" 11TEST_CATEGORY = "Benchmark" 12TEST_CLASS = "power" 13TEST_TYPE = "server" 14DEPENDENCIES = "servo_state:WORKING" 15PY_VERSION = 3 16 17DOC = """ 18Stress test Servo changing PD role. 19""" 20 21# Workaround to make it compatible with moblab autotest UI. 22global args_dict 23try: 24 args_dict 25except NameError: 26 args_dict = utils.args_to_dict(args) 27 28servo_args = hosts.CrosHost.get_servo_arguments(args_dict) 29 30def run(machine): 31 host = hosts.create_host(machine, servo_args=servo_args) 32 job.run_test("power_ServoChargeStress", host=host, total_loops=100, sleep=5, 33 tag=NAME.split('.')[1]) 34 35parallel_simple(run, machines) 36