1# Copyright (c) 2009 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 = "Chrome OS Team" 6NAME = "power_IdleServer" 7TIME = "SHORT" 8TEST_CATEGORY = "Benchmark" 9TEST_CLASS = "power" 10TEST_TYPE = "server" 11DEPENDENCIES = "rpm" 12 13DOC = """ 14This test first cuts off power to a machine and then measures the battery power 15draw at idle. 16""" 17 18from autotest_lib.server import utils 19 20args_dict = utils.args_to_dict(args) 21servo_args = hosts.CrosHost.get_servo_arguments(args_dict) 22 23def run_system_power_idle(machine): 24 host = hosts.create_host(machine, servo_args=servo_args) 25 if host.has_power(): 26 host.power_off() 27 28 host_at = autotest.Autotest(host) 29 host_test = 'power_Idle' 30 31 host_at.run_test(host_test) 32 33 if host.has_power(): 34 host.power_on() 35 36 37(tuple, failures) = utils.form_ntuples_from_machines(machines, 1) 38 39job.parallel_simple(run_system_power_idle, tuple[0], log=False) 40