1# Copyright (c) 2015 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 5from autotest_lib.server import utils 6 7AUTHOR = "ChromeOS team " 8NAME = "platform_FullyChargedPowerStatus.stress" 9PURPOSE = "Check power status after suspend, unplug, plug and resumed" 10CRITERIA = "This test will fail if power status disply as no on AC, discharging as state & less than 95%." 11TIME = "MEDIUM" 12TEST_CATEGORY = "Functional" 13TEST_CLASS = "platform" 14TEST_TYPE = "server" 15SUITE = "stress_experimental" 16DEPENDENCIES = "rpm, power:battery" 17 18DOC = """ 19This test check fully charged power status after suspend and resume the device 20with multiple sets of power status changed before, between and after. 21 22The test fails if 23- online is 'no' 24- power status is 'discharging' 25- display percentage is < 95% 26""" 27 28args_dict = utils.args_to_dict(args) 29 30def run(machine): 31 32 host = hosts.create_host(machine) 33 34 power_status_sets = [(False, False, True), 35 (True, False, True), 36 (False, True, False), 37 (True, False, False)] 38 39 job.run_test("platform_FullyChargedPowerStatus", host=host, 40 disable_sysinfo=True, power_status_sets=power_status_sets) 41 42parallel_simple(run, machines) 43