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.full" 7TIME = "LENGTHY" 8TEST_CATEGORY = "Stress" 9TEST_CLASS = "suite" 10TEST_TYPE = "server" 11DOC = """ 12Sequence for qualification for thermal. 13""" 14 15from autotest_lib.client.common_lib import utils 16 17HOURS=60*60 18 19# Need separate list for client and server test due to how these test work. 20CLIENT_TESTS = [ 21 ('power_WaitForCoolDown', {}), 22 ('power_Speedometer2', {'tag' : 'thermal_qual_full_before'}), 23 24 ('power_BatteryCharge', { 25 'percent_target_charge' : 70, 'max_run_time': 5 * HOURS}), 26 ('power_WaitForCoolDown', {}), 27 ('power_ThermalLoad', { 28 'tag' : 'thermal_qual_full_discharge', 'force_discharge' : True}), 29 ('power_Speedometer2', {'tag' : 'thermal_qual_full_ThermalLoad_discharge'}), 30 31 ('power_BatteryCharge', { 32 'percent_target_charge' : 70, 'max_run_time': 5 * HOURS}), 33 ('power_WaitForCoolDown', {}), 34 ('power_VideoCall', { 35 'tag' : 'thermal_qual_full_discharge', 'force_discharge' : True}), 36 ('power_Speedometer2', {'tag' : 'thermal_qual_full_VideoCall_discharge'}), 37 38 ('power_BatteryDrain', { 39 'force_discharge' : True, 'drain_to_percent' : 30, 40 'drain_timeout': 5 * HOURS}), 41 ('power_WaitForCoolDown', {}), 42 ('power_ThermalLoad', {'tag' : 'thermal_qual_full_charge'}), 43 ('power_Speedometer2', {'tag' : 'thermal_qual_full_ThermalLoad_charge'}), 44 45 ('power_BatteryDrain', { 46 'force_discharge' : True, 'drain_to_percent' : 30, 47 'drain_timeout': 5 * HOURS}), 48 ('power_WaitForCoolDown', {}), 49 ('power_VideoCall', {'tag' : 'thermal_qual_full_charge'}), 50 ('power_Speedometer2', {'tag' : 'thermal_qual_full_VideoCall_charge'}) 51] 52 53# Workaround to make it compatible with moblab autotest UI. 54global args_dict 55try: 56 args_dict 57except NameError: 58 args_dict = utils.args_to_dict(args) 59 60pdash_note = args_dict.get('pdash_note', '') 61 62def run_client_test(machine): 63 client = hosts.create_host(machine) 64 client_at = autotest.Autotest(client) 65 66 for test, argv in CLIENT_TESTS: 67 argv['pdash_note'] = pdash_note 68 client_at.run_test(test, **argv) 69 70job.parallel_on_machines(run_client_test, machines) 71