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 5AUTHOR = "puthik" 6NAME = "ThermalQual.fast" 7TIME = "SHORT" 8TEST_CATEGORY = "Stress" 9TEST_CLASS = "suite" 10TEST_TYPE = "server" 11DOC = """ 12Make sure that ThermalQual.full works. 13""" 14 15from autotest_lib.client.common_lib import utils 16 17# Need separate list for client and server test due to how these test work. 18CLIENT_TESTS = [ 19 ('power_Speedometer2', { 20 'tag' : 'thermal_qual_fast_before' 21 }), 22 ('power_BatteryCharge', { 23 'percent_target_charge' : 10, 'max_run_time': 600 24 }), 25 ('power_ThermalLoad', { 26 'tag' : 'fast', 'force_discharge' : True, 'duration': 180, 27 'second_period' : 1 28 }), 29 ('power_BatteryDrain', { 30 'force_discharge' : True, 'drain_to_percent' : 99, 'drain_timeout': 600 31 }), 32 ('power_WaitForCoolDown', {}), 33 ('power_VideoCall', { 34 'tag' : 'fast', 'duration': 180, 'second_period' : 5 35 }), 36 ('power_Speedometer2', { 37 'tag' : 'thermal_qual_fast_after' 38 }), 39] 40 41# Workaround to make it compatible with moblab autotest UI. 42global args_dict 43try: 44 args_dict 45except NameError: 46 args_dict = utils.args_to_dict(args) 47 48pdash_note = args_dict.get('pdash_note', '') 49 50def run_client_test(machine): 51 client = hosts.create_host(machine) 52 client_at = autotest.Autotest(client) 53 54 for test, argv in CLIENT_TESTS: 55 argv['pdash_note'] = pdash_note 56 client_at.run_test(test, **argv) 57 58job.parallel_on_machines(run_client_test, machines) 59