blob: 943b2176dddb44f8c7b26670e068e5a398ee0fae [file] [log] [blame]
# Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from autotest_lib.server import utils
AUTHOR = "Chrome OS Team"
NAME = "power_ChargeStatus"
PURPOSE = "Servo based ChromeOS functional tests."
This test will fail if:
1. "power_supply_info" state value reports "Discharging" when AC plugged or
online value is "no".
2. "power_supply_info" state value reports "Charging" when AC Unplugged or
online value is "yes".
The Command line args to run this test is as follow:
1. If DUT is connected to RPM(default), No need to pass any command line args.
2. If DUT is connected to USB powerstrip(servoj10), Need to pass
3. If DUT is not connected to either RPM or Servo and to run Manual, Need to
pass --args=power_control="manual".
TEST_CLASS = "power"
TEST_TYPE = "server"
DOC = """
This test is used to verify the power_supply_info 'status' of the DUT on
turning power ON/OFF of charge.
args_dict = utils.args_to_dict(args)
servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
def run_chargestatus(machine):
host = hosts.create_host(machine, servo_args=servo_args)
job.run_test("power_ChargeStatus", host=host, disable_sysinfo=True,
parallel_simple(run_chargestatus, machines)