| # Copyright 2020 The ChromiumOS Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| NAME = "power_LW.power_LoadTest_1hour" |
| METADATA = { |
| "contacts": ["chromeos-platform-power@google.com", "puthik@google.com"], |
| "bug_component": "b:1361410", |
| "criteria": "This test is a power benchmark test.", |
| "hw_agnostic": False, |
| "doc" : "Control file for running power_LoadTest in power lab.", |
| } |
| TEST_TYPE = "server" |
| # ATTRIBUTES = "suite:power_dashboard" |
| DEPENDENCIES = "servo_state:WORKING" |
| |
| from autotest_lib.client.common_lib import utils |
| |
| args_dict = utils.args_to_dict(args) |
| servo_args = hosts.CrosHost.get_servo_arguments(args_dict) |
| test = 'power_LoadTest' |
| args = { |
| 'pdash_note': args_dict.get('pdash_note', ''), |
| 'tag' : '1hour_PLW', |
| 'loop_time' : 3600, |
| 'loop_count' : 1, |
| 'test_low_batt_p' : 6, |
| } |
| |
| def run(machine): |
| host = hosts.create_host(machine, servo_args=servo_args) |
| job.run_test("power_BatteryChargeControl", host=host, |
| percent_charge_to_add=None, percent_target_charge=70, |
| tag=NAME.split('.')[1]) |
| job.run_test("power_LW", host=host, test=test, args=args, |
| machine=machine, tag=NAME.split('.')[1]) |
| |
| parallel_simple(run, machines) |