blob: 215f45da03083b4a24dc19618091c9daa412dbfe [file] [log] [blame]
# Copyright (c) 2012 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.
import re
AUTHOR = "Chrome OS Team"
NAME = "power_Standby"
TEST_CATEGORY = "Benchmark"
TEST_CLASS = "power"
TEST_TYPE = "client"
DOC = """
This test measures the power draw during standby (S3).
Test uses RTC wake to transistion from S3 to S0 every sample_hours for a total
standby time of test_hours. The S3->S0 transistions are added to
1. Validate battery use
2. Guarantee that S3 was maintained (no external/false wake)
3. Create S3->S0->S3 transistions which more closely model user's interaction.
sample_hours: float, number of hours between charge use samples.
test_hours: float, the number of hours to run the test.
Test must meet the following criteria:
Battery must contain ~20% of its charge.
Must be run on battery power
sample_hours > 0.1
test_hours > sample_hours
opts = {}
sample_hours = 1.0
test_hours = 12.0
max_milliwatts_standby = 500.0
for arg in args:
match ="^(\w+)=(.+)", arg)
if match:
opts[] =
if 'test_hours' in opts:
test_hours = float(opts['test_hours'])
if 'sample_hours' in opts:
sample_hours = float(opts['sample_hours'])
job.run_test('power_Standby', sample_hours=sample_hours, test_hours=test_hours,