1 # Copyright 2015 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 5 import logging 6 7 from autotest_lib.client.common_lib import utils 8 9 10 AUTHOR = "kathrelkeld" 11 NAME = "stress_ClientTestReboot" 12 TIME = "SHORT" 13 TEST_CATEGORY = "Functional" 14 TEST_CLASS = "Stress" 15 TEST_TYPE = "server" 16 17 DOC = """ 18 This test takes the name of a client side test. This test is run many times 19 over, rebooting the DUT in between each time. 20 21 Example usage: 22 test_that stress_ClientTestReboot <ip> --board=<board> 23 --args="testname=NAME loops=N" 24 """ 25 26 args_dict = utils.args_to_dict(args) 27 28 def run_reboot_stress(machine): 29 if 'testname' in args_dict and 'loops' in args_dict: 30 testname = args_dict.get('testname') 31 loops = int(args_dict.get('loops')) 32 job.run_test('stress_ClientTestReboot', client_ip=machine, 33 testname=testname, loops=loops) 34 else: 35 logging.info('Please provide the name of a client autotest and the ' 36 'number of times the test should be run. ' 37 '"testname=<test> loops=<number>"') 38 39 parallel_simple(run_reboot_stress, machines) 40