Home | History | Annotate | Download | only in power_IdleServer
      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 
      5 AUTHOR = "Chrome OS Team"
      6 NAME = "PowerIdleServer"
      7 TIME = "SHORT"
      8 TEST_CATEGORY = "Benchmark"
      9 TEST_CLASS = "power"
     10 TEST_TYPE = "server"
     11 DEPENDENCIES = "rpm"
     12 
     13 DOC = """
     14 This test first cuts off power to a machine and then measures the battery power
     15 draw at idle.
     16 """
     17 
     18 from autotest_lib.server import utils
     19 
     20 
     21 def 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 
     37 job.parallel_simple(run_system_power_idle, tuple[0], log=False)
     38