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