| # Copyright (c) 2015 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 = "helenzhang " |
| NAME = "platform_FullyChargedPowerStatus" |
| PURPOSE = "Check power status after suspend, unplug, plug and resumed" |
| CRITERIA = "This test will fail if power status disply as no on AC, discharging as state & less than 95%." |
| TIME = "SHORT" |
| TEST_CATEGORY = "Functional" |
| TEST_CLASS = "platform" |
| TEST_TYPE = "server" |
| SUITE = "bvt-perbuild" |
| DEPENDENCIES = "rpm, servo" |
| |
| DOC = """ |
| This test check fully charged power status after suspend and resume the device |
| with power status changed before, between and after as follows: False, False, True |
| |
| The test fails if |
| - online is 'no' |
| - power status is 'discharging' |
| - display percentage is < 95% |
| """ |
| |
| args_dict = utils.args_to_dict(args) |
| servo_args = hosts.CrosHost.get_servo_arguments(args_dict) |
| |
| def run(machine): |
| host = hosts.create_host(machine, servo_args=servo_args) |
| |
| power_status_sets = [(False, False, True)] |
| |
| job.run_test("platform_FullyChargedPowerStatus", host=host, |
| disable_sysinfo=True, power_status_sets=power_status_sets) |
| |
| parallel_simple(run, machines) |