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 = "PowerIdleServer" 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 20 21def run_system_power_idle(machine): 22 host = hosts.create_host(machine) 23 if host.has_power(): 24 host.power_off() 25 26 host_at = autotest.Autotest(host) 27 host_test = 'power_Idle' 28 29 host_at.run_test(host_test) 30 31 if host.has_power(): 32 host.power_on() 33 34 35(tuple, failures) = utils.form_ntuples_from_machines(machines, 1) 36 37job.parallel_simple(run_system_power_idle, tuple[0], log=False) 38