blob: 72999520de12922c196292f93c2ba11d2d70fd58 [file] [log] [blame] [edit]
# Copyright (c) 2010 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.
AUTHOR = "Chrome OS Team"
NAME = "HWQualBatteryChargeTime"
TIME = "LONG"
TEST_CATEGORY = "Benchmark"
TEST_CLASS = "suite"
TEST_TYPE = "client"
DOC = """
This test measures the battery charging time and enforces constraints. Before
running this test the battery charge should be less than 5% and the device
should be plugged into AC. Over the course of at most 94% of 4 hours the
battery charge should increase by at least 94% of the maximum battery charge
by design.
"""
# In the time limit account for the delta charge constraints
max_hours = 4
percent_charge_delta = 94.0
time_limit = max_hours * 60 * 60 * percent_charge_delta / 100.0
job.run_test('power_BatteryCharge',
max_run_time=time_limit,
percent_charge_to_add=100,
percent_initial_charge_max=5,
constraints=[
'percent_final_charge - percent_initial_charge >= %f' %
percent_charge_delta,
])