Home | History | Annotate | Download | only in power_ChargeStatus
      1 # Copyright (c) 2013 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 from autotest_lib.server import utils
      6 
      7 AUTHOR = "Chrome OS Team"
      8 NAME = "power_ChargeStatus"
      9 PURPOSE = "Servo based ChromeOS functional tests."
     10 CRITERIA = """
     11 This test will fail if:
     12 1. "power_supply_info" state value reports "Discharging" when AC plugged or
     13     online value is "no".
     14 2. "power_supply_info" state value reports "Charging" when AC Unplugged or
     15     online value is "yes".
     16 
     17 The Command line args to run this test is as follow:
     18 1. If DUT is connected to RPM(default), No need to pass any command line args.
     19 2. If DUT is connected to USB powerstrip(servoj10), Need to pass
     20    --args=power_control="servoj10".
     21 3. If DUT is not connected to either RPM or Servo and to run Manual, Need to
     22    pass --args=power_control="manual".
     23 """
     24 TIME = "SHORT"
     25 TEST_CATEGORY = "Power"
     26 TEST_CLASS = "power"
     27 TEST_TYPE = "server"
     28 DEPENDENCIES = "rpm"
     29 
     30 DOC = """
     31 This test is used to verify the power_supply_info 'status' of the DUT on
     32 turning power ON/OFF of charge.
     33 """
     34 
     35 args_dict = utils.args_to_dict(args)
     36 servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
     37 
     38 def run_chargestatus(machine):
     39     host = hosts.create_host(machine, servo_args=servo_args)
     40     job.run_test("power_ChargeStatus", host=host, disable_sysinfo=True,
     41                  cmdline_args=args)
     42 
     43 parallel_simple(run_chargestatus, machines)
     44