blob: c88db6d7ccaba67b09ef834878ad68c654ad52df [file] [log] [blame]
# 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. Also, the battery capacity at test time must be
at least 80% of design capacity (battery wear can be 20% at most). Over the
course of 3 hours, the battery charge should increase by at least 94% of the
maximum battery charge.
"""
# In the time limit account for the delta charge constraints
max_hours = 3
percent_charge_delta = 94.0
time_limit = max_hours * 60 * 60 * percent_charge_delta / 100.0
# battery must be at least 80% of design capacity
percent_battery_wear_allowed = .20
job.run_test('power_BatteryCharge',
max_run_time=time_limit,
percent_charge_to_add=100,
percent_initial_charge_max=5,
use_design_charge_capacity=False,
constraints=[
'1.0 - ah_charge_full / ah_charge_full_design <= %f' %
percent_battery_wear_allowed,
'percent_final_charge - percent_initial_charge >= %f' %
percent_charge_delta,
])